Valhalla Legends Forums Archive | Visual Basic Programming | [VB] TimeStamp - for you

AuthorMessageTime
dRAgoN
[code]
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type

Private Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)

Public Function TimeStamp() As String
Dim SysT As SYSTEMTIME
GetLocalTime SysT
TimeStamp = "*" & SysT.wDay & "/" & _
SysT.wMonth & "/" & _
SysT.wYear & " " & _
SysT.wHour & ":" & _
SysT.wMinute & ":" & _
SysT.wSecond & "* "
End Function
[/code]

Go nuts. :P
August 3, 2003, 11:45 PM
K
how 'bout
[code]
Public Function TimeStamp() As String
TimeStamp = "*" & Format(Now, "dd/MM/yyyy hh:nn:ss AM/PM") & "* "
End Function
[/code]

What were you doing with that API call? ::)
August 4, 2003, 12:36 AM
dRAgoN
had nothing better to do :P
August 4, 2003, 1:49 AM
iago
You make the API call to get SysT, then you still use Now..
August 4, 2003, 7:06 AM
dRAgoN
my screwup 8(

thx for pointing that out +1 to you ^^
August 4, 2003, 8:57 AM
iago
Thanks, now it's a little more useful, if for nothing else then for something to learn off of :)
August 4, 2003, 10:16 AM
FuzZ
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D
March 11, 2004, 9:04 PM
LoRd
[quote author=FuzZ link=board=31;threadid=2193;start=0#msg48952 date=1079039045]
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D
[/quote]

Goodjob reviving a 7 month old topic.
March 11, 2004, 10:54 PM
Adron
[quote author=FuzZ link=board=31;threadid=2193;start=0#msg48952 date=1079039045]
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D
[/quote]

Good job looking at old posts instead of reasking the same question! I assume you used the search feature?
March 11, 2004, 11:04 PM
CrAz3D
ooh, search, gotta love it. Too bad it doesn't search other forums too, or something of the sort that has a larger info scope.
March 11, 2004, 11:49 PM
R.a.B.B.i.T
Advanced Search
March 13, 2004, 1:07 AM
dRAgoN
[quote author=FuzZ link=board=31;threadid=2193;start=0#msg48952 date=1079039045]
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D
[/quote]Your welcome.
March 14, 2004, 7:36 AM

Search