• Hey, I am importing a DB from a custom CMS to WordPress and I am just stuck on one part – I don’t know how to convert UNIXTIME to DATETIME.

    i.e. all the date records in my current DB are like this – 1157070397

    I want to convert them all to the DATETIME format which WordPress uses – 2007-07-21 17:00:19

    Is there a simple query I can run to achieve this? Many thanks 🙂

Viewing 1 replies (of 1 total)
  • Thread Starter zxb2

    (@zxb2)

    Figured it out 🙂

    For future reference:

    UPDATE name_of_date_table SET date_field = FROM_UNIXTIME(date_field)

Viewing 1 replies (of 1 total)
  • The topic ‘Convert UNIXTIME to DATETIME’ is closed to new replies.