Re: MySQL date casting..

From: Date: Tue, 17 Jan 2006 17:51:44 +0000
Subject: Re: MySQL date casting..
Groups: php.db 
Request: Send a blank email to php-db+get-41046@lists.php.net to get a copy of this message
Ahh! Thank you Philip! That's what I was looking for! I see what I did wrong now. I was using the date format strings wrong. I was using it like I'd use it for DATE_FORMAT() instead of as an input filter. This is what I was trying to do: select STR_TO_DATE('2003-11-05 06:00 PM', '%Y-%m-%d %H:%i:%s') duh... hah. Thanks! I knew it was something simple. -TG ------------------ What's wrong with [using] this? mysql> select str_to_date('2005-10-27 07:00 PM', '%Y-%m-%d %l:%i %p'); +---------------------------------------------------------+ | str_to_date('2005-10-27 07:00 PM', '%Y-%m-%d %l:%i %p') | +---------------------------------------------------------+ | 2005-10-27 19:00:00 | +---------------------------------------------------------+ 1 row in set (0.04 sec) ___________________________________________________________ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com.

« previous php.db (#41046) next »