The filters for Date and/or Time fields can be used in the following formats:
• Date and time fields: datetime'2010-10-25T12:34:56'.
• Date only fields: datetime'2010-10-25'.
• Time only fields: filter not supported.
The supported operators are described in the following table:
Operator |
Description |
eq |
Equal |
ne |
Not equal |
gt |
Greater than |
ge |
Greater than or equal |
lt |
Less than |
le |
Less than or equal |
EXAMPLES:
Filter by events with "Deadline" field of value greater than or equal to October 5th 2013: {WSUrl}/api/events?$filter=Deadline ge datetime'2013-10-05'
To create a filter for a specific date, for example, events created on September 19th 2011, the following filter should be used instead of the "eq" filter:
{WSUrl}/api/events?$filter=(Created ge datetime'2011-09-19')and(Created lt datetime'2011-09-20')
To create a filter for a specific date and time, for example, a filter for events updated after 9:30pm on November 05th 2013:
{WSUrl}/api/events?$filter=UpdatedOn ge datetime'2013-11-05T21:30:00'