Skip to Content

SAPUI5 Date formatting issue

Mar 02 at 01:12 PM


avatar image
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

And in the app running on the SAP Gateway it returns:


On my WebIDE it returns:


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,


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers