views:

149

answers:

5

I have one number that has something related to the currentdate :

634101448539930000 634101448627430000 (this information was took 9 seconds later than the first one)

I have many codes like this and I need to know what those number means. It's something related to the current time, because the new information has always a bigger number than the older ones.

Please if anybody could help me, thanks

+2  A: 

Dates and times are generally stored as a single number in computer languages. The number usually represents an offset from a specific data. For example it might be an offset from 1 Jan 1970. Usually you don't deal with these numbers. I suspect that if you look at your APIs you will find a function to convert these numbers into more meaningful representations.

Derek Clarkson
A: 

It could be a variation of Unix Time ( a converter for unix time is available here ).

Unix time is a way of representing a date/time as a number that is easy to store and compare. Your numbers may be a substring of unix time, or may be a format designed by the author. I would examine your ASP.NET code to check how it is used, and you'll find out what it means.

SLC
+3  A: 

Well, the second number is 87500000 greater than the first, and since they're about 9 seconds apart, I'd guess it was number of 100 nanoseconds since some epoch.

If you divide the number by 1x10^7, you get approximately the number of seconds since 1 Jan 0001 (ignoring the calendar reforms and all that stuff).

Paul Tomblin
+10  A: 

It's a Tick Count.

There are 10,000 ticks in 1 ms. That number is the number of milliseconds that have passed since January 1st, 0001 at midnight.

This particular tick count represents the date/time 2010-05-22 17:07:33 (makes sense, since that's today).

Aaronaught
Absolutelly correct. new DateTime( 634101448539930000 ) is "22/5/2010 17:07:33.993"
Ivan Zlatanov
+1  A: 

It appears that those numbers represent your system's internal system time with precision down to the decimicrosecond (one ten-millionth of a second), as measured from the date January 1st, 1 A.D.

634101448627430000 - 634101448539930000 = 87500000
                  87500000 / 10,000,000 = 8.75

And, using Perl's Time::Duration module:

&duration_exact(634101448627430000/10_000_000);

2010 years, 263 days, 17 hours, 7 minutes, and 42 seconds

So from that we know that 63410144862 seconds ago was 2010 years ago, so the timestamp is based at the year 1 A.D.

amphetamachine