Jump to content

Formatting date to store in MySQL table


emartin24

Recommended Posts

Hello,

 

I have a date that's in DATE_RFC822 format: Thu, 31 May 2007 18:16:55 EDT

 

I want to store it in a MySQL table as a TIMESTAMP. When I try to do a strtotime on the value and insert it, I get an 'Incorrect datetime value' error for the column.

 

I also would like to have it be a PST value, but I guess I can just convert it when I retrieve it from the DB.

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/53802-formatting-date-to-store-in-mysql-table/
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.