How to Enter Dates in Queries

To search for dates, you can use a date range [start date .. end date] or a specific date. Several date variables are available.

Examples

Show certificates that are valid within certain dates

certificate:(validFrom: [2018-06-15 .. 2018-06-30])

Show certificates that are valid on a specific date

certificate:(validFrom: '2019-12-14')

Show certificates that expire between today and 2020-12-01

certificate:(validTo: "[now..2020-12-01]")

Show certificates that are valid from 1- 8 months ago.

certificate:(validFrom:[now-8M .. now-1M])

 

Date Variables

Date variables help you define a date or date range.

We support:

yyyy (i.e. 2018)

yyyy-MM (i.e. 2018-02)

yyyy-MM-dd (i.e. 2018-02-15)

yyyy-MM-dd HH (i.e. 2018-02-15 10 for Feb 15 from 10am-11am)

yyyy-MM-dd HH:mm (i.e. 2018-02-15 10:30 for Feb 15 at 10:30am)

yyyy-MM-dd HH:mm:ss (i.e. 2018-02-15 10:30:44 for Feb 15 at 10:30:44am)

Use the "now" Shortcut

Type now- then a number and a time unit: y (year), M (month), w (week), d (day), h (hour), m (minute), s (second)

now-1y for 1 year ago

now-2M for 2 months ago

now-5d for 5 days ago

Comparison Operators

We support comparison operators in your date searches.

certificate:(validity > 200d)

certificate:(validity < 1y)

certificate:(validTo >= "2022-06-01")

certificate:(validTo <= "2021-06-10")