What format does the meta_query TIME type require?

Date and time format meta_query requires the same format you used when storing the data of the meta fields. Some times different formats can be compared directly, but most of the time they aren’t. A recommend format to use is MySQL format:

  • date format: YYYY-MM-DD (for PHP date functions: Y-m-d)
  • time format: HH:MM:SS (for PHP date functions: H:i:s)
  • datetime: YYYY-MM-DD HH:MM:SS (for PHP date functions: Y-m-d H:i:s)

Other recommended format is UNIX timestamp; both can be used directly in database queries with sorting and comparing conditions but if you use MySQL formats you can also recognize the datetime visually.

Additionally, you must note that in meta_query (quoting from codex):

The ‘type’ DATE works with the ‘compare’ value BETWEEN only if the
date is stored at the format YYYY-MM-DD and tested with this format.

So you have to store dates as YYYY-MM-DD if you want to set the type argument to DATE.