on 2022 Oct 07 12:36 PM
Hi Experts,
I have date ranges, and want to convert the value into timestamp to insert the data to back-end.
here is my code for conversion.
var oFormatDate = sap.ui.core.format.DateFormat.getDateTimeInstance({
pattern: "yyyy-MM-ddTKK:mm:ss"
});
var dateFromDeparture = sap.ui.getCore().byId("departureDateDR").getDateValue();
var dateToDeparture = sap.ui.getCore().byId("departureDateDR").getSecondDateValue();
console.log("fromDate", dateFromDeparture);
console.log("newFormat Date", new Date(oFormatDate.format(dateFromDeparture)));<br>
<br>
it still shows the same format even I tried to format the date value;
Request clarification before answering.
Hi,
How about you specify the format in your xml file like this:
<DateTimePicker id="departureDateDR" valueFormat="yyyy-MM-dd'T'HH:mm:ss" />
Regards,Dominic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.