Skip to Content
Feb 07, 2014 at 01:43 PM

Convert date format in SAPUI5


Hi Expert,

I want to convert date format as SAP input format. In SAPUI5 I have used below code:

<Label id="lbl1" text="Enter Date" visible="true" required="true" design="Bold"> </Label>

<DateTimeInput id="dtDT" type="Date" change="dateFunc"></DateTimeInput>

The input format is: FEB 7,2014.

I need to convert this format to YYYY/MM/DD and display in a alert method as a message.

How to convert the input date format into YYYY/MM/DD format.

Any possible sollution would be accepted gratefully.

Thanks & Regards,

Arindam Samanta.