RE: [PHP] datetime formatting problem

From: Date: Fri, 28 May 2004 21:28:10 +0000
Subject: RE: [PHP] datetime formatting problem
Groups: php.general 
Request: Send a blank email to php-general+get-187172@lists.php.net to get a copy of this message
appreciate the headsup, but all times will be from when record is inserted which will not be possible before today. thanks, m. -----Original Message----- From: Jordan S. Jones [mailto:list@racistnames.com] Sent: Friday, May 28, 2004 2:20 PM To: php-general@lists.php.net Subject: Re: [PHP] datetime formatting problem [snip /] >Hi Matt, > >try this: > >function formatDate($val) { > $timestamp = strtotime($val); > return date('M d, Y g:i A', $timestamp); } > > strtotime possibly will not work if your date is < 01/01/1970. [snip /] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#187172) next »