Hi!

U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as
below.

<?php
date("Y-m-d",strtotime("8-Aug-03"));

?>

Hope this helps and let me know.

Cheers

Binay

----- Original Message -----
From: "Anil Garg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 29, 2003 11:01 AM
Subject: [PHP] converting date into database date format(newbie)


> Hi,
>
> I am a newbie to php.
>
> I am reading date in the format "08-Aug-03" from a text file. While
writing
> this date into the myqsl database's date column it shows '00-00-0000'.
> Is there a function or some other way to convert "08-Aug-03" type of dates
> in to format which is acceptable by date field of the mysql database.
>
> Thanks and regards
> Anil.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to