Using DateTime Ranges
You can specify a query for a date/time range, and use it in filter expressions (but not in sort expressions) to query a range of endDates, a range of startDates, or a startDate to endDate period.
Different separator characters have the following effects:
Separator | Specifies that... |
---|---|
[ | The start of the range is exclusive. |
] | The end of the range is exclusive. |
{ | The start of the range is inclusive. |
} | The end of the range is inclusive. |
, | startDate is specified first, endDate next. |
^ | The whole range is endDate values. |
! | The whole range is startDate values. |
All the date formats supported by startDate and endDate (see Sort Filter Criteria) are supported.
The following examples all use the date format yyyy-MM-dd:
Filter Expression | Description |
---|---|
[2010-05-23,2010-07-23] |
(start_date>'2010-05-23T23:59:59.997' AND end_date<'2010-07-23T00:00:00.000') |
{2010-05-23,2010-07-23} |
(start_date>='2010-05-23T00:00:00.000' AND end_date<='2010-07-23T23:59:59.997') |
[2010-05-23,2010-07-23} |
(start_date>'2010-05-23T23:59:59.997' AND end_date<='2010-07-23T23:59:59.997') |
{2010-05-23,2010-07-23] |
(start_date>='2010-05-23T00:00:00.000' AND end_date<'2010-07-23T00:00:00.000') |
[2010-05-23^2010-07-23] |
(end_date>'2010-05-23T23:59:59.997' AND end_date<'2010-07-23T00:00:00.000') |
{2010-05-23!2010-07-23} |
(start_date>='2010-05-23T00:00:00.000' AND start_date<='2010-07-23T23:59:59.997') |
Copyright © Cloud Software Group, Inc. All rights reserved.