<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: REST json Date property format (Thread)</title><description>&#xD;
Hi, can anyone explain in what format Date properties are returned over REST Api? (e.g. "StartDate": "/Date(1078128000000-0800)/",)&#xD;
&#xD;
</description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/issues-questions/1475.aspx</link><item><guid isPermaLink="false">threadId=1475</guid><author>Predrag Matuski (alchnemesis@gmail.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">rest</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> api</category><title>REST json Date property format</title><description>&#xD;
Hi, can anyone explain in what format Date properties are returned over REST Api? (e.g. "StartDate": "/Date(1078128000000-0800)/",)&#xD;
&#xD;
</description><pubDate>Thu, 16 Jun 2016 12:31:19 -0400</pubDate><a10:updated>2020-10-19T06:00:17-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/1475.aspx</link></item><item><guid isPermaLink="false">messageId=2660</guid><author>Jim R (donotreply5@kronodesk.net)</author><title> &#xD;
&#xD;
&#xD;
Hi Predrag  SpiraTeam uses the WCF JSON serialization library from Microsoft .NET to convert </title><description> &#xD;
&#xD;
&#xD;
Hi Predrag  SpiraTeam uses the WCF JSON serialization library from Microsoft .NET to convert dates into JSON. You can read more about this format  here .  Basically, Dates in SpiraTeam are represented in JSON as  "\/Date(number  of ticks)\/" .  The number of ticks is a  positive or negative long value that  indicates the number of  ticks  (milliseconds)  that have elapsed since  midnight  01 January, 1970 UTC .  Regards  Jim </description><pubDate>Fri, 17 Jun 2016 18:43:45 -0400</pubDate><a10:updated>2016-06-17T18:43:45-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/1475.aspx#reply2660</link></item><item><guid isPermaLink="false">messageId=3863</guid><author>rick beron (rickberon@protonmail.com)</author><title>  The JSON specification does not specify a format for exchanging dates which is why there are so ma</title><description>  The JSON specification does not specify a format for exchanging dates which is why there are so many different ways to do it. The problem with dates in JSON and JavaScript in general - is that theres no equivalent literal representation for dates. In JavaScript/ jQuery  following Date constructor straight away converts the milliseconds since 1970 to Date as follows:   var jsonDate = new Date(1297246301973);  Then lets convert it to js format:  var date = new Date(parseInt(jsonDate.substr(6)));  The substr() function takes out the /Date( part, and the parseInt() function gets the integer and ignores the )/ at the end. The resulting number is passed into the Date constructor .  For ISO-8601 formatted JSON dates, just pass the string into the Date constructor:  var date = new Date(jsonDate);     </description><pubDate>Mon, 19 Oct 2020 06:00:17 -0400</pubDate><a10:updated>2020-10-19T06:00:17-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/1475.aspx#reply3863</link></item></channel></rss>