Return to Snippet

Revision: 27388
at June 4, 2010 19:51 by rifat


Initial Code
function mysql2php($str)  {
    list($date, $time) = explode(' ', $str);
    list($year, $month, $day) = explode('-', $date);
    list($hour, $minute, $second) = explode(':', $time);

    $timestamp = mktime($hour, $minute, $second, $month, $day, $year);

    return $timestamp;
}

Initial URL

                                

Initial Description

                                

Initial Title
MySQL date to PHP timestamp

Initial Tags
mysql, php

Initial Language
PHP