on 03-02-2018 1:12 PM
dateFormat: sap.ui.core.format.DateFormat.getDateTimeInstance({
pattern: "yyyyMMdd"
})
And later on in the code I format my date like:
// this.datePeriod2 : Mon 31 December 2018 23:59:59 GMT+0100
this.dateFormat.format(this.datePeriod2);
And in the app running on the SAP Gateway it returns:
"20191231"
On my WebIDE it returns:
"20181231"
My question is:
Can someone explain me why in my WebIDE, I do get the right date "20181231" and in the SAP Gateway I get "20191231"? And how do I fix it?
Both UI5 versions are the same: 1.44.8.
I'm really clueless here. Thank you in advance.
Best regards,
Thijs
Hi Thijs,
Your issue might be related to the way the gateway format the date.
This is how I format my date for example:
oDateFormat = sap.ui.core.format.DateFormat.getDateInstance({pattern : "yyyy-MM-dd", "UTC": true});
SAP Note 2511532 may help.
Cheers,
Ric.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.