FROM_UNIXTIME - to convert timestamp to string date in mysql
I’ve been looking for a solution on how to convert timestamp to string in my query. I’ve tried using DATE_FORMAT but it didn’t work coz my dates are saved as timestamp. After long search I found this… FROM_UNIXTIME… and it solved my problem
select FROM_UNIXTIME(1202635768, ‘%Y%m’) from table
=> will return 200802
Tags: convert timestamp to string date, FROM_UNIXTIME, mysql


