Jump to content

conerting date to timestamp


anujgarg

Recommended Posts

I use this function to do it for me

 

function mysql2timestamp($datetime){

      $val = explode(" ",$datetime);

      $date = explode("-",$val[0]);

      $time = explode(":",$val[1]);

      return mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]);

}

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.