How do you set the date range in a report we pull down through the Webapi?
How do I use the function "dateRelativeUnit" in conjunction with the fuction "dateStart" and "dateEnd" ?
What is the differenece between "dateEnd" and "endDate"?
Does using "dateEnd", and "endDate" manifest in the same programmatic end result? How do I use both?
Why does using these functions in a argument, "dateRelativeUnit=week&dateStart=2&endDate=0" seem to work, but using date&dateStart in place of week&dateStart doesn't seem to work?
When using the WebAPI to create a report (/api/create), you can specify a date filter using absolute units or relative units. Absolute dates can be specified in Unix time or as an ISO 8601 string. Relative dates are powerful, but are slightly more complex. Relative dates specify date filters in one of the following categories:
If the dateRelativeUnit parameter is set, the dateStart and dateEnd define the number of units into the past. The following are valid units: year, month, week, day, and hour. It is important to understand that dateStart and dateEnd always represent a point in time that is on a boundary of a whole unit (year, month, week). A value of zero for dateStart or dateEnd represents the nearest whole unit in the past. Therefore, if dateStart is set to zero and dateRelativeUnit is set to year, the dateStart represents January 1, of the current year. If dateStart is set to zero and dateRelativeUnit is set to week, the dateStart represents Sunday of the current week.
These functions below result in the above absolute values.
1: Parameter: dateEnd
2: Parameter: dateStart
NOTE1: For more information about UNIX time, or ISO 8601, see TIME.
NOTE2: For more information on how to use the WEBAPI, seeKB3899
Rate this Page
Please take a moment to complete this form to help us better serve you.