Sort on date

  • Posts: 38
  • Thank you received: 0
11 years 11 months ago #49054

When I attempt to sort on date, the sorting does not work correctly.

I have a custom field called "start date", and it is of type "date". So when sorting from first to last, it sorts correctly for the month portion of the date field, but the day field does not sort properly. For instance, 3 shopping cart items could have dates of 5/2/2012, 5/18/2012, and 5/19/2012, but when sorted, it displays as 5/18/2012, 5/19/2012, 5/2/2012. The sorting algorithm thinks that 5/2/2012 if after 5/19/2012 since it thinks that "2" is greater than "19" (it thinks the 2 should come after 19).

For URL example see www.rocksolidresults.com/nhcrafts/course...ting&Itemid=561&cid=

Is there a fix for this?

Thank you for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 0
11 years 11 months ago #49055

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 11 months ago #49131

The fix is to edit your custom field and change the date format in order to have the year first, then the month and the day at the end.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum