Jestem Newbie
Joined: 15 Aug 2003 Posts: 7
|
Posted: Sat Jan 03, 2004 8:29 am Post subject: Epoch > @datetime |
|
|
I am not exactly sure if this is correct, so was hoping that someone could take a look at this math and see if I have it wrong, or perhaps there is a more efficient way of doing it. Converting epoch time to @dateformat() time-value:
| Code: | REM Epoch for Jan 3, 03 - 02:19:17
%%epoch = 1073096357
REM Years since 1900 (windows) to 1970 (Unix)
%%fadd = 25569
%%vdsDate = @fadd(%%fadd,@fmul(@fdiv(@fdiv(@fdiv(@fdiv(%%epoch,365),24),60),60),365))
info Epoch date %%epoch is: @datetime(mmmm dd@chr(44) yyyy hh:nn:ss,%%vdsDate) |
Last edited by Jestem on Mon Jan 05, 2004 6:26 pm; edited 1 time in total |
|