Hi All,
I have a time stamp field in EDM.time format (PT13H00M00S) from OData .I need to show it as 24 hour time on my view like 13:00 .
I have followed this blog Working with OData Dates and Times
and able to get time as 01:00: PM .
Instead of 12 Hour time format I need to show it as 24 hour clock time.
I have used the below piece of code in my formatter for this conversion:
var timeFormat = sap.ui.core.format.DateFormat.getTimeInstance({pattern: "KK:mm:ss a"});
var TZOffsetMs = new Date(0).getTimezoneOffset()*60*1000;
var timeStr = timeFormat.format(new Date(value.ms + TZOffsetMs));
which returns 01:00 PM
Could any one help me how it can be achieved ?
BR
Sitara