Date Input Format for Date Filters

Forums › Forums › Search & Filter Pro › Date Input Format for Date Filters

Tagged: ,

Viewing 3 posts – 1 through 3 (of 3 total)
  • Anonymous
    #99580

    Hi,

    Is it possible for the Search and Filter Pro plugin to filter on metadata date values using a dd/mm/yy format in the database instead of the yyyymmdd format?

    I realized when I was trying to search/filter custom post types with a dd/mm/yy date field in my database, then the post wouldn’t show up because it didn’t recognize the dd/mm/yy format.

    Thanks!

    Trevor
    #99597

    It isn’t, because of the way SQL saves dates in the format you request. Many custom field plugins now have the option to save in the 20170327 (today) type format specifically to support filtering. For example, ACF does, calling this format yymmdd. Many datepickers do the same.

    Anonymous
    #99834

    Hi Trevor,

    Got it, thanks for the confirmation!

    That answers my question.

    Best,

Viewing 3 posts – 1 through 3 (of 3 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.