on 03-03-2016 11:26 AM
Hi,
I want to change the date format in an UploadCollectionItem. I use Smart Templates and the field comes from the backend as DATS.
Currently, the Date shows:
Thu Mar 03 2016 01:00:00 GMT+0100 (W. Europe Standard Time)
But I want it like this: 2016-03-03
How can i change the format?
View:
<UploadCollection fileType="undefined" id="__collection0" items="{to_Documents}" maximumFileSize="0" maximumFilenameLength="0"
mimeType="undefined">
<items>
<UploadCollectionItem
contributor="{created_by}"
enableDelete="false"
enableEdit="false"
fileName="{file_name}"
mimeType="{mime_type}"
uploadedDate="{created_on_dats}"
url="/sap/opu/odata/sap/ZMM_TEST5_SRV/Document(guid=guid'{guid}',entity_guid=guid'{entity_guid}',edms_guid=guid'{edms_guid}')/$value"
visibleDelete="false"
visibleEdit="false">
<attributes></attributes>
<statuses></statuses>
</UploadCollectionItem>
</items>
</UploadCollection>
Hi Marcel,
Have you taken a look at the dateformatter? Example in the demo kit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply, I got it now:
uploadedDate="{ path: 'created_on_dats',
type: 'sap.ui.model.type.Date',
formatOptions: {
style: 'short'
}}"
See SAPUI5 explored:
https://sapui5.netweaver.ondemand.com/explored.html#/entity/sap.ui.model.type.Date/samples
User | Count |
---|---|
84 | |
10 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.