Jump to content

Unix/Date formats conversion


bachx

Recommended Posts

http://us.php.net/manual/en/function.strtotime.php

 

Or, if your database is MySQL, create a new column and populate it with the following:

 

UPDATE table SET new_ts_col = UNIX_TIMESTAMP(STR_TO_DATE(datecolumn,'%Y/%m/%d'));

 

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_str-to-date

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.