Timestamp question

From: Date: Wed, 23 Mar 2005 02:12:01 +0000
Subject: Timestamp question
Groups: php.db 
Request: Send a blank email to php-db+get-39010@lists.php.net to get a copy of this message
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

« previous php.db (#39010) next »