Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: AnThRaXBoT on December 18, 2002, 10:37 AM

Title: Can someone please help...
Post by: AnThRaXBoT on December 18, 2002, 10:37 AM
Can someone please help me get my damn time stamp to 12 hour time? I've tried multiple things and none of which seem to work...

Here is the code,
strTimeStamp = "[" & Format(Date, "mm/dd/yy") & " " & Format(Time, "hh:mm:ss") & "] "

I've tried switching the hh:mm:ss to HH:MM:SS and there is no difference, I've tried just using h:mm:ss and still nothing.

Thanks in advance!
Title: Re: Can someone please help...
Post by: erase on December 22, 2002, 07:25 AM
public sub timestamp()
AddChat "<", &H808080, Format(Time, "hh:mm:ss"), &H808080
AddChat ">", &H808080
end sub


usage:

Timestamp
AddChat user & " has entered the channel"
Title: Re: Can someone please help...
Post by: Grok on December 22, 2002, 10:33 AM
erase,

hope you don't mind a suggested upgrade in your solution.

Public Sub Timestamp()
    AddChat "<", &H808080, Format(Time, "HH:MM:SS AMPM"), &H808080
    AddChat ">", &H808080  
End Sub