mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
I am having difficulties trying to create a time converter to convert 24-hour time (i.e. 14:45:23 (hour:minute:seconds)) into 24 hour based time (i.e. 2:45:23 (hour:minute:seconds)).

I'm not sure if there is an mIRC identifier that I overlooked, hopefully there is maybe? .> ;p

*is tired* *kicks schooll* frown

hmm... Well Fiy ou got anything to please help thanks o_O

*sleeps*


Live to Dream & Dream for Life
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Use
Code:
 $asctime(<time in seconds>, h:nn:ss tt) 

If you have the time in a 24 hour format, you can use $duration to turn it into seconds

eg: %time = 23:53:12
Code:
$asctime($duration(%time), h:nn:ss tt)  

would return 11:53:12 pm

The single h will display 1 rather than 01 for hours (if 1 am or 1 pm)

/help $asctime
/help $duration


Link Copied to Clipboard