Re-Envisioned › Support › MB Custom Table › Date format between custom field and database field › Reply To: Date format between custom field and database field
This is a great question! While saving the date with
varchar is not a problem, I think saving in
date format of MySQL might be a better idea. However, as you see, MySQL forces data saved in the DB in its format, not what you enter. So, I think there are 2 solutions for this:
- Just use
varchar, so you save what you enter
- Use the
save_formatattribute for the field, set it to the format of MySQL and you’re free to go. It tells Meta Box to store value in one format and display in another format.