Hi all,
I am trying to get the current date and time using "DateFormat" function available in sapui5.. below is the code I used
var dateFormat = sap.ui.core.format.DateFormat.getDateInstance({pattern:"dd/MM/yyyy"});
var timeformat= sap.ui.core.format.DateFormat.getTimeInstance({pattern:"KK:mm:ss a"});
console.log(timeformat);
console.log(dateFormat);
and the error is.. Uncaught error: cannot read property 'DateFormat' undefined..
I have included the sap.ui.core library in index.html.. eventhen I am getting the same error..
please provide me the solution.. thank you..