API: How to set date/time parameters
The Parse.ly API allows for both fixed and relative time inputs to query data. Learn more about the metrics that you can pair with date/time values in queries.
Parse.ly allows for a variety of fixed time formats.
|YYYY-MM-DD||Year-Month-Day. Example: |
|YYYY-MM-DD±00:00||Year-Month-Day with timezone offset. Example: |
|YYYY-MM-DDThh:mm||Year-Month-Day with time in publisher timezone. Example: |
|YYYY-MM-DDThh:mm±00:00||Year-Month-Day with time and timezone. Example: |
All values need to be appropriately URL-encoded when submitted, or you may receive an error. Notably, the
+ sign in positive timezone offsets will need to be converted to
%2B, either your HTTP request library or manually, otherwise it will be interpreted as a space.
Timezone offsets in string form, e.g.
UTC, are not allowed.
Parse.ly also allows for relative time formats.
Relative times are a number followed by
w for minutes, hours, days, and weeks, respectively.
15m for 15 minutes ago,
24h for 24 hours ago.
15 min or
15minutes should not be used.
Last updated: December 02, 2022