Hi Colleagues,
var oItemTemplate2 = new sap.ui.core.ListItem(
{
text :
{
path:"SlotTi",
formatter : function(fValue)
{
jQuery.sap.require("sap.ui.core.format.DateFormat");
var oTimeFormat = sap.ui.core.format.DateFormat.getTimeInstance(
{
pattern: "KK:mm:ss a"
});
if( fValue != undefined || fValue != null){
fValue= fValue.toString();
// fValue= fValue.slice(6,-2);
// fValue = Number(fValue);
}
return oTimeFormat.format(new Date(fValue));
}
}
});
where fValue is PT12H50M00S.
When showing on dropdown
r2c1.bindItems("/d/results", oItemTemplate2);
result is shown as NaN:NaN:NaN PM,
How to convert this to values.
Best regards,
Rohit