cancel
Showing results for 
Search instead for 
Did you mean: 

Change default format for DateTime field from OData service

sergey_muratov
Participant
0 Kudos

Hello.

The default option for displaying in the table a field of type DateTime (OData) does not suit me. Is it possible to replace the default format for this value not at the level of each column with a DateTime type, but for the entire table or component? (For example there is a table with more than 50 columns and 15 columns have DataTime type.)

sergey_muratov
Participant
0 Kudos

Thanks for answers.

But I meant a little different. Can I specify the desired format more globally? At the level of type DateTime or at the table level? Specify the format once, and it should apply to multiple columns.

Accepted Solutions (0)

Answers (2)

Answers (2)

WouterLemaire
Active Contributor

You can use type "Date" and "formatOptions" in your binding to change the format of the date, here an example of a binding:

value="{path: 'datevalue', type: 'sap.ui.model.type.Date', formatOptions: { pattern: 'dd/MM/YYYY' , UTC:true}}"
mateuszadamus
Active Contributor