Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: CrAz3D on March 09, 2004, 08:58 PM

Title: FileTime & Such
Post by: CrAz3D on March 09, 2004, 08:58 PM
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.
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

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:4[/u]:36
Notice the time & the single digit 4.

Help is appreciated, thnx
Title: Re:FileTime & Such
Post by: o.OV on March 09, 2004, 09:17 PM

Format(Time, "hh:mm:ss")
Title: Re:FileTime & Such
Post by: Eric on March 09, 2004, 09:21 PM
Quote from: o.OV on March 09, 2004, 09:17 PM

Format(Time, "hh:mm:ss")

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.
Title: Re:FileTime & Such
Post by: CrAz3D on March 09, 2004, 09:23 PM
Yes, thank you.
Title: Re:FileTime & Such
Post by: UserLoser. on March 10, 2004, 07:50 PM
Better yet:


Right$("0" & ST.wHour, 2)