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
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php