views:

30

answers:

1

Hi!

I have a table with the column "create_time" which is of type 'INTEGER' and represents the time since epoch.

I'd like to select all rows & columns while displaying this row as a date/time in UTC format.

How do I do that?

+1  A: 

Use FROM_UNIXTIME to convert seconds since epoch to a DATETIME, which also allows you specify a format:

FROM_UNIXTIME(create_time, '%Y-%m-%d %H:%i:%s')
OMG Ponies
Thank you! ............
Poni