How to convert this time 1329944650
to this time 2011-1-2
using MySQL
I just want to know how to change mktime to this date (2011-01-2)
using MySQL.
Try with FROM_UNIXTIME(unix_timestamp,format)
FROM_UNIXTIME(1329944650, '%Y-%m-%d')
To convert unix timestamp into human readable format mysql has built-in function FROM_UNIXTIME() it takes 2 parameters first is the timestamp that you want to convert and the second one is the format in which you want to convert in your case this should be
FROM_UNIXTIME('1329944650', '%Y-%m-%d');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With