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

How to format an Edm.DateTime string from an oData query

$
0
0

Hi All,

I'm really progressing with my JS development, thanks to all the Dynamics community

My next question is regarding the Edm.DateTime format with in oData query

        var i;
        var showAlert = "";
        for (i = 0; i < alertArray.length; i++) {
               showAlert +=  alertArray[i].CreatedOn + "   -   " + alertArray[i].new_Alert + "\n";
        }
        Xrm.Page.getAttribute("new_clientalerts").setValue(showAlert);
   }


Above is the code snippet that processes the oData query.  Held in alertArray is the CreatedOn Edm.DateTime field.  This writes to CRM in the following format

/Date(1452643163000)/
/Date(1448985498000)/

 


What would be the best way to format this into DD/MM/YYYY

Thanks


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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