mIRC Homepage
Posted By: PhantasyX Time Converter (24hr to 12hr) - 31/08/05 04:13 AM
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*
Posted By: RusselB Re: Time Converter (24hr to 12hr) - 31/08/05 04:23 AM
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
© mIRC Discussion Forums