Home Forums General Issues Filtering by date Reply To: Filtering by date

  • Hi @AdamWebDev

    For reference, the date field docs are located here:

    I have not yet used the DATE compare method, and can’t confirm that it works with a custom field value in the format of Y-m-d.

    To sort posts based on a date picker value, the value must be saved with the format yymmdd. Is this the save format you are using? Or are you using something else?

    Your next issue is that $today is in a format of Y-m-d. These ‘-‘ characters need to be removed and you need to sort by Ymd

    Then change your compare type from DATE to NUMERIC, however you may not even need this setting.

    Hope that helps.

    Basically, you need to c