Skip to content Skip to sidebar Skip to footer

Appcelerator Titanium Js Dosen't Parse Date() As Expected

I am using Appcelerator Titanium, and I'm trying to parse a date string as a new Date object and then use the .getTime() function but it keeps returning 'NaN' var d = new Date('201

Solution 1:

You're trying to parse a UTC date time. In Titanium, when you try to parse the date, it will return invalid date. So you need to convert it to datetime string. You can use Convert UTC Date to datetime string Titanium to convert the time.


Post a Comment for "Appcelerator Titanium Js Dosen't Parse Date() As Expected"