Get 13 digit datetime equivalent

  • Thread starter Thread starter anony
  • Start date Start date
A

anony

Hi,

If I have a datetime, how do I display it as its13 digit numeric value?

Thanks.
 
Anony,

A datetime's Ticks property contains the raw number that represents that
datetime's date and time.

Kerry Moorman
 
anony,
What specifically do you mean by "its 13 digit numeric value"?

Especially consider that a DateTime has more then 13 "digits" of data...
(there are 21 "digits" of data...

You could possible use DateTime.ToString to convert the elements of a
DateTime to a string in the format you desire.

Dim value As DateTime = DateTime.Now
Debug.WriteLine(value.ToString("yyyyMMddHHmmssfffffff"), "now")

For details on custom datetime formats see:

http://msdn.microsoft.com/library/d...s/cpguide/html/cpcondatetimeformatstrings.asp

For information on formatting in .NET in general see:
http://msdn.microsoft.com/library/d...y/en-us/cpguide/html/cpconformattingtypes.asp

Hope this helps
Jay
 
I was thinking of the time portion having 13 digits. Thanks to all who
responded.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top