Using DateTime Literals

A DateTime literal in filter queries allows the creation of an arbitrary DateTime which will be matched against any DateTime format AttributeValue.

The following DateTime variations can be used:

YYYY[timezone]
YYYY-MM[timezone]
YYYY-MM-DD[timezone]
YYYY-MM-DDThh[timezone]
YYYY-MM-DDThh:mm[timezone]
YYYY-MM-DDThh:mm:ss[timezone]
YYYY-MM-DDThh:mm:ss.SSS[timezone]
Timezones. timezone is optional, and can be specified as shown in the following table.
Syntax Description
Z Coordinated Universal Time (UTC)
+|-HH[:MM] Offset from UTC

For example:

2010Z
2010-01-01T01:00+01:00
2010-01-01T01:00.000-04:30
Ranges. When specifying a range, a curly bracket indicates an exclusive value; a square bracket indicates an inclusive value. Square and curly brackets can be mixed in the same range.
Range Description
[2010,2011] Greater than or equal to 01/01/2010 and less than or equal to 31/12/2011
{2010,2011} Greater than 31/12/2010 and less than 01/01/2011
{2010,2011] Greater than 31/12/2010 and less than or equal to 31/12/2011