|
-
Apr 19th, 2009, 06:46 AM
#2
Re: how to get only time from datetime part
The DateTime structure has methods to return a string representation. To get the time only you can call ToLongTimeString or ToShortTimeString. You can also call ToString and specify any standard or custom format string you want to get the date and/or time in any format. MSDN provides all the information you need on date and time format string. As an example, ToString("t") is equivalent to ToShortTimeString() and ToString("T") is equivalent to ToLongTimeString().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|