Inconsistent Date Format

I’m using the reports endpoint (detailed) and am seeing a different format for dates (“Start Date” and “End Date”) when I switch between exportTypes.

Here’s my curl:

curl \
  --silent \
  --header "content-type: application/json" \
  --header "X-Api-Key: $api_key" \
  --data "
      \"dateRangeStart\": \"${start_date}T00:00:00.000Z\",
      \"dateRangeEnd\": \"${end_date}T12:59:59.000Z\",
      \"detailedFilter\": {
        \"page\": 1,
        \"pageSize\": 1
      \"exportType\": \"CSV\"
  " \${workspace_id}/reports/detailed

When the format is CSV the dates are in YYYY-DD-MM format but when the format is JSON the dates are in YYYY-MM-DD format (desirable).

Hi John, when your export type is set to JSON, the report will always return dates in ISO-8601 format. However, when your export type is set to CSV, the dates will be in the format you set up on your Profile settings.

To change the date format, login to your Clockify account from your web browser, click on your icon in the top right corner, and open Profile settings. On the Profile settings page, you will be able to change the Date format.

Thanks @milan! I changed my format not too long ago and mistakenly chose the wrong format. :man_facepalming: