Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Miva's Date

Status
Not open for further replies.

kavukattu

Programmer
Apr 29, 2002
13
US
Does anyone know how to interpret Miva's date structure? So in the date field in my database, this is what it stores:
1024852815
Any help would be great
Thanks,
Toby
 
That may be a time stamp. It is the number of seconds since Jan 1,1972 (I think that is the right date). It is a common use for a date. You can try looking it up in any languae help file.
 
The origination date must be Jan 1, 1970. Based on the information gcole provided: 1024852815/60 secs per min/60 mins per hour/24 hours per day/365 days per year = 32.49786958 years. [thumbsup2]
 
As mentioned above, the origination date must be Jan 1, 1970. I take the number 1024852815 and divide it by 86,400. This is how many secondes are in a day (60 seconds * 60 minutes * 24 hours).

After this, I take the number it gives me (11,861 days since 01/01/1970) and add it to 01/01/1970. This also factors in leap years. The date is 06/23/2002.
 
Just in case there are any Visual FoxPro users needing this, the following is the formula I use to obtain a DateTime value from the Order.Date field:

[tt]ttod(ctot('01/01/1970 00:00:00') + val(date))[/tt]
--------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top