Convert UTC Date to datetime string Titanium
I have a date string "2012-11-14T06:57:36+0000" that I want to convert to the following format "Nov 14 2012 12:27" . I have tried a lot of solutions including Convert UTC Date to datetime string Javascript . But nothing could help me. The following code worked for me in android. But for ios it displays as invalid date var date = "2012-11-14T06:57:36+0000"; //Calling the function date = FormatDate(date); //Function to format the date function FormatDate(date) { var newDate = new Date(date); newDate = newDate.toString("MMMM"); return (newDate.substring(4,21)); } Can anyone help me? Thanks in