Hi,
I am new to sapui5 and i believe this will be something easy for you guys the expert to help me with.
I have an odata entity that has a date attribute as key, as type edm.dateTime.
In order to retrieve a particular entity, i use the following code to bind:
var sObjectPath = this.getModel().createKey("PeopleSet", {
InDate: oDate,
Uid: sUserName
});
this.getView().bindElement("/" + sObjectPath);
oDate is the Date object return from CalendarDateInterval control.
So for example if i pick the date of 30/6/2016, the odata call inDate will be formatted to 2016-06-29T16:00:00 (which is the correct time stamp).
But the problem is, in the odata backend get_entity method:
1. If I use a date type to receive the data, i will only get 20160629, which is less than a day than the correct date
2. If i use a timestamp to receive the data, i will get 20160629160000, but i will not have a timezone to convert it to the correct date.
So how do you guys normally handle date?