RE: [PHP-WIN] date format, php, mysql

From: Date: Thu, 07 Nov 2002 18:46:27 +0000
Subject: RE: [PHP-WIN] date format, php, mysql
Groups: php.windows 
Request: Send a blank email to php-windows+get-16791@lists.php.net to get a copy of this message
Hi, You can use something like this: $todaydatetime = date("Y m d G:i"); That will translate into: 2002 11 07 18:12 or if you want to us 12hour clock try this: $todaydatetime = date("Y m d g:i"); That will translate into: 2002 11 07 6:12 (changed G (hour, 24-hour format without leading zeros; i.e. "0" to "23") to g (hour, 12-hour format without leading zeros; i.e. "1" to "12") You can check out all the values for changing the format here: http://www.php.net/manual/en/function.date.php Cheers Jambo -----Original Message----- From: Adrian Partenie [mailto:adrian.partenie@artelecom.net] Sent: 07 November 2002 16:06 To: php-windows@lists.php.net Subject: [PHP-WIN] date format, php, mysql Hello, How can I modify a date format from $b="Jan 7 1999, 3:51 pm" into other format? like 1999 01 07 3:51 for example? I have tried with strftime, but it change format only for current date. Thanks, Adrian

« previous php.windows (#16791) next »