Re: PHP/MySQL -- Date/Time Confusion

From: Date: Fri, 12 Jul 2002 23:00:55 +0000
Subject: Re: PHP/MySQL -- Date/Time Confusion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107451@lists.php.net to get a copy of this message
The easiest and my preferred way is to use "strtotim" method. This method accepts MySQL format "2002-12-23" and converts it into a UNIX time stamp. After that you can use the date function to format time as you wish! Monty <monty3@hotmail.com> wrote: Which method is the best way to store date/time in MySQL and then which PHP command is the best to use to convert that date to something useful? I'm having a difficult time figuring out how to reconcile the date in MySQL so it works with PHP's various date commands, like getdate(). Any suggestions? I'll mostly need to compared dates/times of different records and then extract parts of the date for displaying on the screen. Thanks! Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --------------------------------- Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free & unlimited access

« previous php.general (#107451) next »