Re: date and time conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



babu wrote:
Hi,
how to convert DD.MM.YYand HH:MM:SS into mysql date( 'YYYY-MM-DD' ) and time format. I think the time is same as HH:MM:SS.

burhan@sandbox ~ $ php -r 'echo date("Y-m-d",strtotime(str_replace(".","/","12.12.05")))."\n";'
2005-12-12

Hope that helps :)

See http://php.net/date
    http://php.net/strtotime
    http://php.net/mktime

For more information

--
Burhan

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux