Skip to Content

SAPUI5 Formatting UTC DateTime String in Text

Hello everyone,

I've been struggling with this for hours now, and I hope someone could help me.

I have a JsonModel bound to my table, that has a String Property with the following format:


I wanted to format this date on my Text control like 'yyy-MM-dd'. However, my text is always emtpy and I receive the error message "The given date instance isn't valid"

My string looks like this:


And my text control like this:

 <Text text=" { 
                formatOptions: { 
                  source : { 
                    pattern: 'yyyy-MM-ddTHH:mm:ss' 
                  pattern: 'yyyy-MM-dd'

The binding is correct, because if I remove the formatoptions the string is displayed.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 14, 2018 at 04:31 PM

    Your pattern is incorrect, it should be

    pattern: 'yyyy-MM-ddTHH:mm:ss X'



    Add comment
    10|10000 characters needed characters exceeded