Date ordering altered by display format?
-
Hello Pete:
Short version: I have a table with a DATE column; select via SQL ordering by that column and it orders correctly: 01 Jan sorts before 05 Feb, despite ‘J’ coming after ‘F’ in the alphabet.
I create a publication, ordering by that column, and it also orders correctly. Then I change the WordPress date formatting option, to try and get nicer (‘plain English’) formatting of the dates… and suddenly the publication displays its date results as though it were sorting by text, not date. Thus 8th January sorts before 11th February, which sorts before 23rd May -because 8 sorts before 11, textually.
The page I link to contains complete information about the situation (though please ask me if you need any clarification).
Basically, I want 31st January to sort before 1st April to sort before 11th May, and all before the 4th June… yet, by changing the Wordpres *display* format for dates, I seem to alter the way the underlying DATE-type data is being ordered.
Am I doing something wrong or stupid? Or is there actually an issue here.
Best regards
HowardThe page I need help with: [log in to see the link]
- The topic ‘Date ordering altered by display format?’ is closed to new replies.