Date comparison


#1

I want to get data according to validity of some properties. There are two fields in one table - “validfrom” and “validto”. Now how to filter data accordingly using couchbaselite & swift


#2

Just create a query with a variable now, that matches documents where validFromnow and nowvalidTo.
Then before running the query, set the value of now to the current date/time (as a string in ISO-8601 format; there is a utility function to do this.)