var myDate = "2017-4-27T00:00:00"; //This is the format SharePoint REST API returns
myDate = convertDate(myDate);
function convertDate(date){
var temp;
temp = date.split("T")[0];
temp = temp.split("-");
date = temp[1] + "/" + temp[2] + "/" + temp[0];
return date;
}
Used to convert date/time from SharePoint's REST API calls
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.