MySQL date format

BassMan

Well-known member
Hi,

if I have a date format in mysql like this 1507670047, how can I know what date that really is? Is there any converter for this?

I'd like to export some tables and would like to have dates in known format.

Thank you.

BassMan
 
It's the number of seconds which have passed since 01/01/1970.

You can use the FROM_UNIXTIME function in MySQL to format it as a date, for example if you were to run this query:
SQL:
SELECT post_id, post_date, FROM_UNIXTIME(post_date) AS actual_date
FROM xf_post
Then you'd see some results like this:
Code:
post_id       post_date     actual_date
16            1494952293    2017-05-16 17:31:33
17            1494952377    2017-05-16 17:32:57
27            1495542683    2017-05-23 13:31:23
 
Top Bottom