Support Forums

Support Forums Forums Search & Filter Pro Date format

This topic is: not resolved

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Kevin Kelly
    #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

    Kevin Kelly
    #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)

You must be logged in to reply to this topic.