Convert between date and unix timestamp: Difference between revisions
Jump to navigation
Jump to search
m
→MySQL way: convert to date from unix timestamp
| Line 93: | Line 93: | ||
<pre> | <pre> | ||
SELECT FROM_UNIXTIME(IF(`timestamp_column` = 0, NULL, `timestamp_column`, "%Y-%m-%d % | SELECT FROM_UNIXTIME(IF(`timestamp_column` = 0, NULL, `timestamp_column`, "%Y-%m-%d %H:%i:%S") | ||
</pre> | </pre> | ||