Jump to content

Incorrect Date: 1969


jadedchron

Recommended Posts

Wednesday, 31st December, 1969 04:00:00 pm is what I'm getting returned from the MySQL database and I'm not sure why. I'm guessing it's based on a Unix timestamp and my PHP function is not formatted properly, but from what I can see from the manual it looks ok. The column type is DateTime.

 

date("l, jS F, Y h:i:s a", $row['date'])

 

Do I need to add specific math in the date function for it to return properly to the current date?

 

Thank you.

 

Link to comment
https://forums.phpfreaks.com/topic/93179-incorrect-date-1969/
Share on other sites

Thanks for the replies guys. Not sure why I didn't receive email notifications.

 

echo $raw['date'] gives me "2008-02-26 13:09:47" which is the same as what's in the DB.

 

I'm trying to turn that into a friendlier format such as February 26th, 2008. I wouldn't mind omitting the time to be honest.

 

Any ideas?

 

Thanks,

Nick

Link to comment
https://forums.phpfreaks.com/topic/93179-incorrect-date-1969/#findComment-478438
Share on other sites

Archived

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.