• BiancoBellucci

    (@biancobellucci)


    Hi folks,

    I have front end form where users insert time in dd/mm/yyyy format. We do it like that in Europe.
    This value is then being passed to wp database as meta value.

    Is there any way to modify this format to yyyy-mm-dd before being stored to wpdb?

Viewing 1 replies (of 1 total)
  • jevets

    (@jevets)

    Yeah, depending on how you’re saving the data.

    If you wrote the part that saves the data (probably using update_postmeta()), you can just do some string manipulation there. In fact you could save anything you want as the postmeta.

Viewing 1 replies (of 1 total)
  • The topic ‘Modify custom field time format before inserting to database?’ is closed to new replies.