Date and time values
DQL supports the RFC3339 standard format for date-time strings.
Each of the following are allowable
values:
@dt('2019-08-06T02:09:52Z')
@dt('2019-08-06T02:09:52.6800+04:00')
@dt('2019-08-06')
@dt('02:09:52')
@dt('02:09:52.6800')
@dt('02:09:52.6800+05:00')
All operators function against all date-time values. In addition, the @created and @modifiedinthisfile function identifiers will use @dt(‘’) values. So, a partial date matches values according to the part specified, if a single day, that day and if a second (or subsecond) within any day, that second. Without timezone modifiers (+ or – hh:mm suffixes) all times are taken as UTC values (GMT). To specify local time, use a timezone suffix modifier.
Note: Partial date values cannot be found using view searching. For example, the following queries
return evaluation errors:
'myview'.datefield < @dt('2018-09-01')
'myview'.datefield = @dt('02:09:52')
To
use view searches and partial date values when you want to find a date but the time
is not important, specify the entire value, for
example:
'myview'datefield < @dt('2018-09-01T00:00:00.000Z')
If
a database has a full text index, a date-only search term such as the following
searches the index:
datefield <= @dt('2019-08-06')