Unix TimeStamp to String

astralprojection

New member
Messages
334
Points
0
I had been looking to convert this time stamp to string format like

   
set .@unban_time,1460968293;
mes .@unban_time     //  but at string format below like
 
gettimestr("%Y-%m-%d %H:%M:%S",21) so that i can export to sql query.
 
Can you help?
 
Thank you
default_biggrin.png

 
 
 
Try this:

Code:
.@unban_time = 1460968293;
query_sql "SELECT FROM_UNIXTIME('"+.@unban_time+"', '%Y-%e-%d %H:%i:%s')", .@format$;
mes .@format$;
close;
 
Back
Top