Solved

How do you extract the TIME from a DateTime variable?

Posted on 2011-09-20
3
267 Views
Last Modified: 2012-05-12
I have a DateTime variable that holds the following value:

1/1/1900 8:30 AM

I want to extract the 8:30 AM from the value.  How do I do this?
0
Comment
Question by:cdemott33
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
p_davis earned 500 total points
ID: 36569075
that particular part is a timespan assigned to the timeofday property

Timespan tod = yourTimeVariable.TimeOfDay;
0
 
LVL 16

Expert Comment

by:disrupt
ID: 36569082
0
 
LVL 16

Expert Comment

by:disrupt
ID: 36569121
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question