Hi friends, today we are going to see how can we convert SharePoint date into human radable date format using jquery.
When you use REST api or JSOM to retrieve the date from sharepoint date field you will get the output like /Date(1508371200000)/
We can easily convert above date format into human readable format using below script. Here
var rawDate = "/Date(1508371200000)/"; var rawDate = parseInt(rawDate.substring(6, 19)); var d = new Date(rawDate); var result = d.format("dd MMM yyyy");
In the above code variable result will give you the output as 19 Oct 2017
I hope you liked this article. Please feel free to ask your queries in comment section below. Like our facebook page ans subscribe to our newslette for future updates. Have a nice day!