Re: Date format
| From: | Jack Dempsey | Date: | Mon, 07 Apr 2003 19:27:12 +0000 |
| Subject: | Re: Date format | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142739@lists.php.net to get a copy of this message | ||
hey mark,
there are a variety of ways to do this. if you get the date in a variable in the form
$date = "10/08/1970";
then you could explode on the / character and set some temp variables, then use them in a date() call with formatting...
try a search on google for php date if you need source code--it should really be an easy string manipulation then date() call...
jack
On Monday, April 7, 2003, at 03:19 PM, Bomgardner, Mark A wrote:
List people: I aploogize if this issue has been resolved in the past, but I am new to php and I could find an answer in the archives. Problem: I have a form that a user inputs a date (mm/dd/yyyy) and I want to convert that to the mysql date yyyy-mm-dd so it can be inputed in to the database. I have tried the date() command with no luck and I am out of options to try. I can get the date out of mysql once it gets there, but putting it into the correct format has been a problem. Any help would be greatly appreaciated. Mark Bomgardner ex-lasso person new php person -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php