[snipplet] Convert mysql date to unixtime

By.

min read

My profile

Share this:

Yes this is the quick and dirty way of converting a row with a mysql date to a unixtime:
[code:1:2a2a60fad0] // Mysql date to unixtime
$date_org = $row[’mysql_date’];
$date_split = explode(’-‘,$date_org);
$date_unix = mktime(0,0,0,$date_split[1],$date_split[2],$date_split[0]);[/code:1:2a2a60fad0]

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *