Working with Dates

Date formats and timezones

While working with dates there are three possible formats you can get them in:

  • Microsoft JSON Date Format
  • ISO Format with timezone support
  • ISO Format without timezone support

📘

All these formats can be also used in API v.1

Microsoft JSON Date Format (default one)

/api/v2/userstories?where=(id=3920)&select={PlannedEndDate}
/api/v2/userstories?where=(id=3920)&select={PlannedEndDate}&dateformat=ms

{
  "items": [
    {
      "plannedEndDate": "\/Date(1517525999000+0100)\/"
    }
  ]
}

ISO Format with timezone support

📘

Targetprocess server timezone is shown

/api/v2/userstories?where=(id=3920)&select={PlannedEndDate}&dateformat=iso

{
  "items": [
    {
      "plannedEndDate": "2018-02-01T23:59:59+01:00"
    }
  ]
}

📘

If you're using On-Demand account, you can check below your server timezone (with and without Daylight Saving Time). Private cloud customers can contact [email protected] for such information

Targetprocess server

Timezone

Timezone (with DST)

Amsterdam (EU)

CET (UTC +1)

CEST (UTC +2)

Dallas (US)

CST (UTC -6)

CDT (UTC -5)

Melbourne (AU)

AEST (UTC +10)

AEDT (UTC +11)

ISO Format without timezone support

/api/v2/userstories?where=(id=3920)&select={PlannedEndDate}&isodate=1

{
  "items": [
    {
      "plannedEndDate": "2018-02-01T23:59:59"
    }
  ]
}

Filter by Dates

Filter

What it does?

PlannedEndDate!=null

Checks if PlannedEndDate is not empty

PlannedEndDate=null

Checks if PlannedEndDate is empty

PlannedEndDate>Today

Checks if PlannedEndDate is later than today

PlannedEndDate<Today.AddDays(5)

Checks if PlannedEndDate is before 5 days from today

PlannedEndDate>DateTime.Parse("2018-10-31")

Checks if PlannedEndDate is after 31st of October 2018