Valhalla Legends Forums Archive | Visual Basic Programming | Unix Time format

AuthorMessageTime
Lenny
Is there an API call or vb function that can retrieve the Unix Time?

I've only found c++ libraries that have it available...
April 7, 2004, 3:35 AM
Noodlez
You can use the Format() function.
Example:
[code]
Format$(MyTime,"hh:mm:ss")
[/code]
April 7, 2004, 5:11 AM
Lenny
Unix time is the number seconds since Jan 1st, 1970 Midnight
April 7, 2004, 5:26 AM
Noodlez
Oh, gah. WebBot requires that time (IIRC). You have to write your own function for it.
April 7, 2004, 5:44 AM
Telos
Its something like DateDiff( Now, "s", #1/1/1970# )
The difference in seconds between now and January 1st 1970
April 7, 2004, 12:48 PM
iago
What format does "now" return the time as? If it's nanoseconds since 1700 or whatever, I have a function that will convert that to seconds since 1970 that I can post.
April 7, 2004, 4:40 PM
kamakazie
[quote author=Telos link=board=31;threadid=6193;start=0#msg53866 date=1081342090]
Its something like DateDiff( Now, "s", #1/1/1970# )
The difference in seconds between now and January 1st 1970
[/quote]

[code]
DateDiff("s", #1/1/1970#, Now)
[/code]
April 7, 2004, 5:00 PM
Lenny
Thanks, I didnt know there was such a vb function...
April 8, 2004, 3:23 AM
CMallette
Unix Time is the amount of seconds since Jan 1st, 1970 GMT.

If the computer using DateDiff("s", #1/1/1970#, Now) is not in GMT timezone, the timestamp will be off by some hours.
April 12, 2004, 11:08 PM

Search