Hi Sergio,
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_format
attribute 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.