Hi,
<?
$date = '2002-12-04 23:21:49';
$newdate = date('m/d/Y', strtotime($date));
echo $newdate;
?>
Should do the trick -- although I haven't stripped out the leading 0 in
either the day or month, hence it will echo 12/04/2002, not 12/4/2002.
Season to taste,
Justin
on 05/12/02 10:58 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:
> I'm displaying a date that I get from a informix database query - the date
> format is as follows;
>
> 2002-12-04 23:21:49
>
> I want it to display as 12/4/2002 11:21:49 PM
>
> Jeff
>
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> On Wednesday 04 December 2002 08:29, Jeff Bluemel wrote:
>>
>>> ... but the date format doesn't seem to
>>> allow me to pass it a date.
>>
>> Your code?
>>
>> --
>> Jason Wong -> Gremlins Associates -> www.gremlins.biz
>> Open Source Software Systems Integrators
>> * Web Design & Hosting * Internet & Intranet Applications Development *
>>
>> /*
>> Information Processing:
>> What you call data processing when people are so disgusted with
>> it they won't let it be discussed in their presence.
>> */
>>
>
>
Justin French
--------------------
http://Indent.com.au
Web Development &
Graphic Design
--------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php