Jump to content
  • 0
Sign in to follow this  
astralprojection

Unix TimeStamp to String

Question

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 :D
 
 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Try this:

 

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.