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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.