• Hello everyone,

    I am using custom fields to assign a “start” date and “end” date to multi-day events.

    The custom field values are entered in text format, such as Sept. 01 and Oct. 09

    Obviously when I order them by the custom key, it sorts them alphabetically because the value starts with a letter. So “O” of October compared to “S” of September makes October come before September.

    If I change the custom key values to number format, such as 100806 for October 8, 2006 and 091206 for September 12, 2006 then they will display correctly, 091206 will come before 100806.

    However, I want to display them on the website in text format..

    So how do I convert the value of the custom key which will be entered in WordPress in numerical date format into a text format for display on the website?

    thank you

  • The topic ‘date format to text, and order by date’ is closed to new replies.