I am struggling to format an OData V4 Edm.DateTime value. When I declare it as normal datetime value
<Label text="{ams>Major}.{ams>Minor}.{ams>Build} (
{
path: 'ams>CreationDate',
type: 'sap.ui.model.type.Date',
formatOptions: {
pattern: 'yyyy/MM/dd'
}
})"/>
I get following error:
TypeError: j.getTime is not a function
If I declare it using the OData data type, nothing is formatted.
<Label text="{ams>Major}.{ams>Minor}.{ams>Build} (
{
path: 'ams>CreationDate',
type: 'sap.ui.model.odata.type.Date',
formatOptions: {
pattern: 'yyyy/MM/dd'
}
})"/>
Puts out e.g.:
2016-11-21T17:13:56.207+01:00
Is there any possibility to format it directly in the XML template, or do I have to use a custom formatter?