Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: Converting oData Date returned by HANA to Javascript String

$
0
0

     var start = that.timeStamp.indexOf('(')+1;

     var end = that.timeStamp.lastIndexOf(')');

     var res = that.timeStamp.substring(start, end);

    

     oDateFormat =  sap.ui.core.format.DateFormat.getInstance({pattern: "MM/dd/yyyy"})

    

     oDateFormat.format(new Date(res));   

 

     console.log(oDateFormat);

 

This gives me the object, not the formatted date. Maksim's answer does the trick


Viewing all articles
Browse latest Browse all 9069

Latest Images

Trending Articles



Latest Images

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