Re: date and time conversion

From: Date: Sun, 11 Sep 2005 14:03:34 +0000
Subject: Re: date and time conversion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-222143@lists.php.net to get a copy of this message
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

« previous php.general (#222143) next »