RE: Date Formatting

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

 



You are looking for the strtotime() function.

$original_date = "Sep 12 2004  2:16AM";
$reformat = date ( "m/d/Y" , strtotime ($original_date) );
echo $reformat;

John

-----Original Message-----
From: Ron.Herhuth@xxxxxxxxxxxxxxxxx
[mailto:Ron.Herhuth@xxxxxxxxxxxxxxxxx]
Sent: Wednesday, September 22, 2004 9:13 AM
To: php-windows@xxxxxxxxxxxxx
Subject:  Date Formatting



I see in the manual about how to format the current date using the date()
function...but my question is...I have the date in this format:
Sep 12 2004  2:16AM

And I needed it formatted as:
09/12/2004  (I don't need the time)

How do I go about doing that?

Thanks,
Ron

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



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux