Jump to content

Date formatting


Recommended Posts

I'm not sure what I'm doing wrong.  I have a date in a table which is formatted as:

2010-08-13 00:00:00.


I am trying to change the date through PHP to display as 08-13-2010.  The date is being formatted as 12-31-1969.


Here's my code.

if($registrant->StatusDate != '0000-00-00 00:00:00')
$formattedDate = date('m-d-Y', $registrant->StatusDate);

$statusDate = '      as of ' . $formattedDate;


Can anyone advise me what I am doing wrong?



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.