Hi -
I have a datetime field which I'm using in a JavaScript function:
function getDate(){
var date = Xrm.Page.getAttribute("new_startdate").getValue();
alert (date)
}
The alert displays the the format of the field as this: Tues Apr 19 08:00:00 UTC+0100 2016
I need to reformat the result to show as this: 2016-04-19 08:00:00, so I can use it in a further part of the function.
Does anyone know how to do this in the JavaScript function?
Thanks,
Rich
*This post is locked for comments