0

Updated for clarity:

I need to convert the post date format from Y-m-d to mdY and sort by mdY numerically, not by the actual timestamp.

My goal is to order the posts by month first, then day, then year.

I can convert the format no problem. How would I then go about sorting them numerically?

  • With so little information, it is hard to guess exactly what your goal is. Sorting by post date does not normally matter how your date is formatted. It orders posts according to a timestamp, which is format agnostic. Then, you output the date in whatever display format you wish. Is there some reason you require sorting to be by month/day/year, vs actual date/time order? Please provide more information, so we can help you. – Mike Baxter Sep 13 '19 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.