Valhalla Legends Forums Archive | Visual Basic Programming | FileTime & Such

AuthorMessageTime
CrAz3D
I am getting the correct time back, it's just that when there is a single digit # in the, IE: SystemTime.wSecond like 04 then Len(ST.wSecond) = 2 but it doesn't display the 0 when I try to add ST.wSecond to something.
[code]Call FileTimeToLocalFileTime(FT, FT)
Call FileTimeToSystemTime(FT, ST)
TIMEO = ST.wHour & ":" & ST.wMinute & ":" & ST.wSecond
AddChat vbGreen, "Account Created: ", vbCrLf & &HC0C000, ST.wMonth & "/" & ST.wDay & "/" & ST.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO[/code]
I tried the TIMEO thing just to see if it would work differeently as a string, but it didn't.
[quote][7:58:11 PM] Account Created: 12/24/2003 @ 11:[u]4[/u]:36[/quote]
Notice the time & the single digit 4.

Help is appreciated, thnx
March 10, 2004, 2:58 AM
o.OV
[code]
Format(Time, "hh:mm:ss")
[/code]
March 10, 2004, 3:17 AM
LoRd
[quote author=o.OV link=board=31;threadid=5704;start=0#msg48663 date=1078888657]
[code]
Format(Time, "hh:mm:ss")
[/code]
[/quote]
That doesn't work if you ever want to add miliseconds.

I already answered his question on AIM, but for future reference, use Format(ST.wHour, "00") for the hour, seconds, ect.
March 10, 2004, 3:21 AM
CrAz3D
Yes, thank you.
March 10, 2004, 3:23 AM
UserLoser.
Better yet:

[code]
Right$("0" & ST.wHour, 2)
[/code]
March 11, 2004, 1:50 AM

Search