I have created a meta field for a custom post type. This is a date field that will always be YYYY-MM-DD. There could be 100s of posts so i cant query them all and sort afterwards. I need to be able to perform a query to get 5 posts ordered by the date, for example, upcoming items. This will display 5 posts that are in the future.
I have looked into it and i can see that it is possible to provide
orderby=meta_value combined with
metakey=date to do this, but it doesnt treat the date as a date object. Is it possible to do this?