Re: Date of Birth From Form
| From: | Steve Cayford | Date: | Fri, 19 Apr 2002 18:40:34 +0000 |
| Subject: | Re: Date of Birth From Form | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18680@lists.php.net to get a copy of this message | ||
A combination of strtotime() and date() can make this easy.
date("Y-m-d", strtotime($birthday))
Or see docs and comments at http://www.php.net/manual/en/function.strtotime.php
-Steve
On Friday, April 19, 2002, at 01:29 PM, Brandon Paul wrote:
Hey all, I have a credit application form, and one of the required elements is the applicant's Date of Birth. I have "creditapp" table with a "birthdate" field and it is a DATE datatype. On the form, I want to be able to have them enter their Date of Birth as "mm/dd/yyyy" and have it go into the database properly (yyyy-mm-dd). Is there a way to do it this way, or am I going about it wrong? Any help would be greatly appreciated. Thanks! Brandon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php