Re: converting a string to a date

From: Date: Wed, 26 Jun 2002 09:01:44 +0000
Subject: Re: converting a string to a date
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20128@lists.php.net to get a copy of this message
My fault... wasn't looking hard enough i guess, thats what 2 a.m. will do to you I guess. here is how to do it, for anyone who finds themselves in a similar situation: $result = date( "y m d", strtotime("$aDay $aMonth $aYear")); echo $result; Seth Yount wrote:
I am trying to find an example of converting a string to a date format suitable for MySQL input. for example... ' 2002 March 15 ' needs to be converted to ' 02-03-15 ' I can reverse this process fine, but am having trouble doing it this way -- Seth


« previous php.db (#20128) next »