Date Field

The Date Field stores a date value within the property, value.

{
 	"Tech Signature Date": {
    	"displayValue": "3/31/2015",
      "value": "2015-03-31T00:00:00Z",
      "id": "f2bde96b-0d31-47c0-91d2-a46c0108d3c5",
      "name": "Tech Sig Date",
      "type": "Date"
  } 
}

📘

NOTE:

The id, name, and type are not necessary when creating or updating a form, they are returned in the JSON of a request for readability.

Value

The value property of the Date Field expects the date in the ISO 8601 format and more specifically in UTC.

The expected format takes the following form, YYYY-MM-DDThh:mm:ssZ, where:

Format

Description

YYYY

A four-digit year, 0000 through 9999.

MM

A two-digit month of the year, 01 through 12.

DD

A two-digit day of that month, 01 through 31.

hh

Zero-padded hour between 00 and 23

mm

A zero-padded minute between 00 and 59

ss

A zero-padded second between 00 and 60 (where 60 is only used to denote an added leap second).

The Date field is only concerned with storing the date values. To that end, in order to save dates in the ISO 8601 format, set the hh:mm:ss of the format to 00:00:00, to indicate at the beginning of the day.

As an example, to set a Date Field to April 27th, 2015 the following format would be used:

{
	"value": "2015-04-27T00:00:00Z"
}

Display Value

The displayValue property of a Date Field is read-only. This means any change to this property will not be persisted after initially setting or updating a Date Field.

The displayValue property presents the value property as a formatted string which is defined by the template rules.