Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Convert date value to JSON format

$
0
0

Hi, I am trying to convert the createdon date to JSON format.

var createdOn = Xrm.Page.getAttribute("createdon").getValue();


This gives createdOn = Wed Jan 13 2016 14:01:49 GMT-0500 (Eastern Standard Time)

However, I need the JSON format (2016-01-13T14:01:49). The issue is that I am trying to get the created on date + 7 days, and using this info for a query.

Is there such method to convert this easily? I know that there is a way to add 7 days using the Date object in JScript, I am just not sure how to take this raw date value and convert to any reasonable format.


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>