CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 UNIX time to other

Print topic Send  topic

Author Message
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.
View profile  Send private message
sysdfg

Posts: 14
Posted: 03/27/2007, 8:26 AM

Double input, my bad.
View profile  Send private message
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?
View profile  Send private message
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.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.