Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Time is shown as NaN Format

$
0
0

   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


Viewing all articles
Browse latest Browse all 8124

Trending Articles



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