Forums › Forums › Search & Filter Pro › search form with post POST META (date and time)
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
Ross.
-
Ross Moderator(Private) July 31, 2014 at 1:37 pm #3079
Hey gianfranco – what format is the date stored in the database? The date must be stored as either a timestamp, or YYYYMMDD – these are the only formats for saving in the database that are supported currently.
Ross Moderator(Private) August 11, 2014 at 1:27 pm #3386Hey gianfranco
Do you mean the display format from the plugin, or the backend format that is saved in the database? Frontend is not too difficult..
The date format in the backend must match a format that can be compared numerically directly from the database – so we can perform searches.
For example if you wanted to find posts within a date range, then the database query would look something like (this is extremely simplified):
SELECT * FROM 'posts' WHERE datefield < '20140601' AND datefield > '20130101'
Basically we have to be able to use operators like “greater than” and “less than” and this is only possible with numbers – not strings (so you cannot add regular characters such as hyphens).. this is also possible with a unix timestamp which is currently supported.
Does that make sense?
-
AuthorPosts