sysdfg
Posts: 14
|
| Posted: 03/27/2007, 8:03 AM |
|
I have a database that stores time in UNIX timestamp (1080749977). I have a GRID page I would like the time to be shown as 31. Mar 2004, the time is not as important as the date.
I have searched the forums and tried different ways. Just cannot seem to get it.
Thanks in advance.
|
 |
 |
sysdfg
Posts: 14
|
| Posted: 03/27/2007, 8:26 AM |
|
Double input, my bad.
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 03/27/2007, 11:19 AM |
|
I don't know why.
I had posted some URL's to code which may get you started.
Do a Google search on "vbscript unix time".
There is some code in ilovejackdaniels which may give you a head start.
I do not remember the other link's source which I had posted.
Essentially, you will end up doing a dateadd using the seconds since a given
date (which is Jan 1, 1970 if I am no mistaken).
Below is your solution. Please test it before using it.
Function UnixTimeToDate(xUnixTime)
UnixTimeToDate = DateAdd("s", xUnixTime, "1/1/1970 00:00:00")
End Function
|
|
|
 |
sysdfg
Posts: 14
|
| Posted: 03/27/2007, 11:35 AM |
|
Should this be under Properties, Events, Before Show?
|
 |
 |
sysdfg
Posts: 14
|
| Posted: 03/28/2007, 4:05 AM |
|
Don't know what is up here, shows five (5) posts but I only see 4.
|
 |
 |
|