Howto: List events by date with pods

Here the  event date is a date/time custom field – start_tag –, it can have any format since it’s still saved as a meta value as yyyy-mm-dd hh:mm:ss it’s just converted for display. I use where to select the events to list.

Remarks:

  • Depending of your SQL server you can use NOW() instead of curdate().
  • SQL comparison (>= etc.) doesn’t work, that’s why I used between

Here some Examples:

pods output without where [pods name="ftermin" template="ftermintmpl" orderby="start_tag.meta_value"]

Pod not found


pods output with where="DATE(start_tag.meta_value) between curdate() and '2020-01-01'"

Pod not found


pods output with where="DATE(start_tag.meta_value) between curdate() and curdate()+30"

Pod not found


pods output with "CAST(start_tag.meta_value as DATE) BETWEEN curdate() and curdate()+30"

Pod not found