{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Dates","type":"basic","slug":"dates","excerpt":"","body":"All date properties of the various response models are formatted in compliance with ISO-8601.  In general the format is “Year-Month-Day’T”Hour-Minutes-Seconds-Ten MIllionths of Seconds-Offset from UTC in minutes”.  The ‘T’ character acts as a separator between the date and time part of the value.\n\nExample: \n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"2015-04-10T00:51:18.0000000+00:00\\\"\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nFor Formz that contain a Date, Time, or DateTime field, the value of the field will contain a value property formatted as shown above, along with a displayValue property, containing the text that was displayed on the form.  \n\nExample: \n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"Date 1\\\": {\\n  \\t\\\"value\\\": \\\"2015-04-09T00:00:00.0000000+00:00\\\",\\n  \\t\\\"displayValue\\\": \\\"4/9/2015\\\",\\n  \\t\\\"id\\\": \\\"...\\\",\\n  \\t\\\"name\\\": \\\"Date 1\\\",\\n  \\t\\\"type\\\": \\\"Date\\\"\\n\\t}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nFor Dates, the Time section will be set to midnight UTC and for Time fields, only the portion of the date after the T character will be returned.  When submitting values, make sure they are encoded as above in order to avoid validation errors.  \nExample: \n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\t\\\"Date 1\\\": {\\n  \\t\\\"value\\\": \\\"2015-04-09T00:00:00.0000000+00:00\\\",\\n  \\t\\\"name\\\": \\\"Date 1\\\",\\n  \\t\\\"type\\\": \\\"Date\\\"\\n\\t}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nWe do not currently preserve the timezone of a date, datetime or time field entered on a form. If a user enters `\"4/9/2015\"` on their form, the api will return the value `\"2015-04-09T00:00:00.0000000+00:00\"`  even if it was entered from a different timezone.\n\nSee https://msdn.microsoft.com/en-us/library/az4se3k1%28v=vs.110%29.aspx#Roundtrip for more info on the format used.","updates":[],"order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"553591ce63cc650d0031292c","version":{"version":"2","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["553591cd63cc650d00312926","553591cd63cc650d00312927","5536e4d39f7f2d0d00b1cd54","5536e55c20d5ca0d0001580a","5536e6bf7fe60f0d000fd1c0","5536f5bba171250d00c00556","553a974369c2630d00a8562e","553a97c60074c80d00621c2a","553a98332af5f20d000fc32a","553a9b9869c2630d00a85642","556e0f23d02e0b190042f13d","563249b1dcc27a1700823650","5639113f049e420d00476b03","59a5dd94aaa11d003334edb4"],"_id":"553591cd63cc650d00312925","project":"55357364e02d480d0003c6d3","releaseDate":"2015-04-20T23:54:53.134Z","__v":13,"forked_from":"55357365e02d480d0003c6d6","createdAt":"2015-04-20T23:54:53.134Z"},"__v":0,"project":"55357364e02d480d0003c6d3","user":"55356ede6040a20d00454508","category":{"sync":{"isSync":false,"url":""},"pages":["553591ce63cc650d00312929","553591ce63cc650d0031292a","553591ce63cc650d0031292b","553591ce63cc650d0031292c","553591ce63cc650d0031292d","553591ce63cc650d0031292e","553591ce63cc650d0031292f","553591ce63cc650d00312930"],"title":"API","slug":"api","order":0,"from_sync":false,"reference":false,"_id":"553591cd63cc650d00312926","__v":1,"createdAt":"2015-04-20T21:45:09.762Z","project":"55357364e02d480d0003c6d3","version":"553591cd63cc650d00312925"},"createdAt":"2015-04-20T22:39:16.284Z","githubsync":"","parentDoc":null}
All date properties of the various response models are formatted in compliance with ISO-8601. In general the format is “Year-Month-Day’T”Hour-Minutes-Seconds-Ten MIllionths of Seconds-Offset from UTC in minutes”. The ‘T’ character acts as a separator between the date and time part of the value. Example: [block:code] { "codes": [ { "code": "\"2015-04-10T00:51:18.0000000+00:00\"", "language": "json" } ] } [/block] For Formz that contain a Date, Time, or DateTime field, the value of the field will contain a value property formatted as shown above, along with a displayValue property, containing the text that was displayed on the form. Example: [block:code] { "codes": [ { "code": "\"Date 1\": {\n \t\"value\": \"2015-04-09T00:00:00.0000000+00:00\",\n \t\"displayValue\": \"4/9/2015\",\n \t\"id\": \"...\",\n \t\"name\": \"Date 1\",\n \t\"type\": \"Date\"\n\t}", "language": "json" } ] } [/block] For Dates, the Time section will be set to midnight UTC and for Time fields, only the portion of the date after the T character will be returned. When submitting values, make sure they are encoded as above in order to avoid validation errors. Example: [block:code] { "codes": [ { "code": "\t\"Date 1\": {\n \t\"value\": \"2015-04-09T00:00:00.0000000+00:00\",\n \t\"name\": \"Date 1\",\n \t\"type\": \"Date\"\n\t}", "language": "json" } ] } [/block] We do not currently preserve the timezone of a date, datetime or time field entered on a form. If a user enters `"4/9/2015"` on their form, the api will return the value `"2015-04-09T00:00:00.0000000+00:00"` even if it was entered from a different timezone. See https://msdn.microsoft.com/en-us/library/az4se3k1%28v=vs.110%29.aspx#Roundtrip for more info on the format used.