No, it's still ISO, but php ISO 8601 adds a 'T' between the date and time part with no space, and MySQL has a space instead, so that was throwing it all wonky :)
OK, issue has been resolved. It was a case of the actual solution being too simple, and I was ignorant enough to think the problem was more complex than it was. I just need to format my date SPECIFICALLY to what was in the database in the column. That's what I get for being used to SQL Server...
Thanks for the tip, I've changed it now. But even after the change, it's still goofy. Both date and time are indeed there, and they are correct for the time that they were posted.
I have a query in a php page that goes something like this:
SELECT * FROM posts WHERE post_time < '$php_var_date' LIMIT 0,1
I'm using this in a blog where I need the previous post's post date. php_var_date is an ISO 8601 formatted date. The post_time is of the data type datetime. While I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.