Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
paste piece of my code below
>>
var start = Date.parse('2015-12-23 12:00:00');
var end = Date.parse('2015-12-23 13:00:00');
what i got was that both start and end equal to NaN, is there anything wrong with the code?
Try
Date.parse('2015-12-23T12:00:00');
Documentation: search for "ECMAScript 5 ISO-8601 format support"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
Thank you for your answer! I tried it but it made no difference. it seems like javascript Date object in thingworx works differently as normal?
In fact, in thingworx it's
Date.parse('12/23/2015 12:00:00')
or
Date.parse("23/12/2015 12:00:00 GMT+0100")
Case related: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS225991
This is an in-built date functions parseDate and parseDateISO. Did you tried that?