Date format

Forums › Forums › Search & Filter Pro › Date format

Tagged: 

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #245624

    Hello,
    The format of my dates in DB is YYYY-MM-DD. How is it possible to change the formation of date searches?

    Thanks in advance, Kevin

    Ross Moderator
    #245711

    Hi Kevin

    It looks like your license is expired. Please renew to continue to receive support.

    In regards to your question, this would be a case of editing the values using a custom script or possibly a plugin – it also depends on how they’ve been added in the first place.

    Thanks

    Anonymous
    #245715

    I renew my licence. Have a script or a plugin idea ?
    Thanks,

    Ross Moderator
    #245716

    Hi Kevin

    So you would create a WP loop to go through the post type you want, and in that loop you would update post meta like this:
    https://wordpress.stackexchange.com/questions/245978/how-can-i-update-post-meta-inside-a-wp-query-loop-or-the-wordpress-loop

    Now, what you actually want to do, is replace the original post meta with the new formatted data.

    So you would get the existing post meta (using get_post_meta function), convert it using PHP date function:
    https://wordpress.stackexchange.com/a/12039
    And save it back to the post using update_post_meta all in that loop.

    Thanks

Viewing 4 posts – 1 through 4 (of 4 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.