Hi,
I have an entity which has one of its key fields of type Edm.DateTime (TIMESTAMP on the ABAP backend).
In my UI5 code I want to bind one entity of which I know the key fields like this:
var oChDateTime = new Date(1436109229000); // toJSON returns "2015-07-05T15:13:49.000Z" so we must strip the last 4 characters and URI encode the whole thing var sPath = "/MyEntitiySet(Id='0815',ChDateTime=datetime'" + encodeURI(oChDateTime.toJSON().substr(0, 19)) + "')"; oView.bindElement(sPath);
Isn't there a more elegant way of handling these Edm.DateTime fields?