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

time coversion

$
0
0

Hi Experts ,

 

            In my project I have a scenarios like below

 

From the OData service I am getting a tme value like this :  PT15H48M26S .This value I am getting in an odata service attribute name : ParkinTm


 

In UI5 I am coverting like this

 

var myFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "KK:mm:ss a"});

 

var newtime = myFormat.format(new Date(ParkinTm.ms));


When I print this time its showing 5.30 extra than the value that i am getting from odata service attrivute ParkinTm. In this case i am getting : 09:16:37 PM which is 5.30 hrs extra than 15h:48m:26s


But my requirement is to print as it as i.e 15:48:26 only . As it is from back end . Can any one tell me how can solve this .


Basically its adding 5.30 hrs to the value coming from backend . Kindly help me in resolving this .


Thanks

Rizwan




Viewing all articles
Browse latest Browse all 3510

Trending Articles



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