Hi there everyone,

 

I have to convert dates in the following format to a valid unix timestamp to
be stored in a mysql DB, how should I write it for this format?

 

12/03/04 (Day,month,year)

 

I'm not sure how to format it correctly.

 

I've tried to following but I don't think it's right:

 

   list( $date, $time ) = split(" ", $listingdate);

   list( $month, $day, $year ) = split( "/", $date );

   list( $hour, $minute, $second ) = split( ":", $time );

 

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

 

Chris

Reply via email to