RE: [PHP-DB] php mysql dates

2004-07-28 Thread Irm Jr
Sure I understand Y-m-d. But won't the database cry because the Month is in text format? (January, february)? Thanks again. Subject: Re: [PHP-DB] php mysql dates On Wed, 28 Jul 2004 14:30:24 -0700, Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts

Re: [PHP-DB] php mysql dates

2004-07-28 Thread Justin Patrin
, is strtotime and date. $mysqlDate = date('Y-m-d', strtotime($month.' '.$day.', '.$year)); If you're using dates far in the past or future, though, this won't work. Better to use a date handling class, such as: http://pear.php.net/package/Date Subject: Re: [PHP-DB] php mysql dates On Wed

RE: [PHP-DB] php mysql dates

2004-07-28 Thread Swan, Nicole
with that, IMHO, is strtotime and date. $mysqlDate = date('Y-m-d', strtotime($month.' '.$day.', '.$year)); If you're using dates far in the past or future, though, this won't work. Better to use a date handling class, such as: http://pear.php.net/package/Date Subject: Re: [PHP-DB] php mysql dates

RE: [PHP-DB] php mysql dates

2004-07-28 Thread Irm Jr
Thanks for the replies. I believe I have two solutions now! Take care. Much apprecitated. -Original Message- From: Swan, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 2:48 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] php mysql dates I would suggest creating

Re: [PHP-DB] php mysql dates

2004-07-28 Thread zareef ahmed
Dear Irm Jr, Here are two functions:: http::/www.php.net/strtotime http::/www.php.net/mktime using these functions togethor you can do the need full. BTW why not store just unix time stamp in mysql database. Most People use a string field in mysql database to store timestamp, it simply work