Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Another option is to use strtotime() and than convert the date via php Commented Nov 14, 2013 at 14:43
  • Thanks i got it working, dont know where the A came from :S, once i swapped the m/d/y to Y/m/d it worked, Thanks for help will mark as answer when i can :) Commented Nov 14, 2013 at 14:45
  • @jphillip724 This is VERY IMPORTANT - Make sure you have an uppercase H as well - lower case will result in 12 hour time and half of your times could be 12 hours out. There is a difference between H:i:s and h:i:s! Commented Nov 14, 2013 at 16:39
  • I know this is an old thread, and I can understand the comment about maintaining dates in mySQL but I can vouch that trying to get the formats into mySQL can be sometimes be very problematic. I have found that manipulating outside mySQL in say PHP can give you a bit more flexibility as you know that you are always dealing with text when going back to mySQL. Anyway my 2c Commented Mar 23, 2018 at 7:09