pmiller624 Posted March 4, 2010 Share Posted March 4, 2010 In my PHP application I receive a date and time string in the format like so... Wed, 03 Mar 2010 22:07:46 +0000 what would be the best way to store this in mysql? what would be the best way pull it from mysql and be able to use PHP's date()? I'm asking this because 'Wed, 03 Mar 2010 22:07:46 +0000' isn't a valid date string (at lest I don't think it is) so when I use date(), it's formatting the date wrong. Thanks ps sorry if this belongs in the mysql section Link to comment https://forums.phpfreaks.com/topic/194081-storing-a-date-format-like-wed-03-mar-2010-220746-0000/ Share on other sites More sharing options...
jskywalker Posted March 4, 2010 Share Posted March 4, 2010 your date/time looks like the output of: print date("r") so, in MySQL is would simply use the datetime field, because using the date() function u can display it in any desired format Link to comment https://forums.phpfreaks.com/topic/194081-storing-a-date-format-like-wed-03-mar-2010-220746-0000/#findComment-1021299 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.