• Welcome to Valhalla Legends Archive.
 

[VB] TimeStamp - for you

Started by l)ragon, August 03, 2003, 06:45 PM

Previous topic - Next topic

l)ragon


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


Go nuts.  :P
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

K

how 'bout

Public Function TimeStamp() As String
       TimeStamp = "*" & Format(Now, "dd/MM/yyyy hh:nn:ss AM/PM") & "* "
End Function


What were you doing with that API call?  ::)

l)ragon

*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

iago

You make the API call to get SysT, then you still use Now..
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


l)ragon

#4
my screwup 8(

thx for pointing that out +1 to you ^^
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

iago

Thanks, now it's a little more useful, if for nothing else then for something to learn off of :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


FuzZ

Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D

Eric

#7
Quote from: FuzZ on March 11, 2004, 03:04 PM
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D

Goodjob reviving a 7 month old topic.

Adron

Quote from: FuzZ on March 11, 2004, 03:04 PM
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D

Good job looking at old posts instead of reasking the same question! I assume you used the search feature?

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.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

R.a.B.B.i.T


l)ragon

Quote from: FuzZ on March 11, 2004, 03:04 PM
Ah Thank you!
I was trying to figure out how to get milliseconds on my timestamp ;D
Your welcome.
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*