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

Re: Extract date from Table in SAPUI5

$
0
0

Hi All,

 

For this problem, I have made a new piece of code. It is working as I want. The code is below:

 

new sap.m.Text({text:{

                                       path:'Exdat', formatter:function(sValue){

                                           var dd = sValue.getDate();

                                           var mm = sValue.getMonth();

                                           var yy = sValue.getFullYear();

                                           if(dd < 10)

                                               {

                                               dd = "0" + dd;

                                               }

                                           if(mm < 10)

                                               {

                                               mm = "0" + mm;

                                               }

                                           var date = dd+"-"+mm+"-"+yy;

                                          

                                           return date;

                                           }

                                       },            

                                  

                                   }),

 

 

It is working fine. Also we can make the desired date format according to customer requirement.

 

Thanks & Regards,

Arindam.


Viewing all articles
Browse latest Browse all 8695

Trending Articles



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