cancel
Showing results for 
Search instead for 
Did you mean: 

Format date as UTC does not work

Former Member
0 Kudos

Hi,

according to this example, i am trying to display a date (stored as UTC - SECONDDATE on the HANA) on my XML-View formatted as UTC:

SAPUI5 Explored

While the following code displays the date (non-formatted),


<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns:c="sap.ui.core"

    xmlns:f="sap.ui.layout.form" xmlns:l="sap.ui.layout" xmlns:t="sap.ui.table"

    xmlns="sap.m">

<t:Table id="idUrgencyOfRequests" inset="false" rows="{/ChargingOrders}">

<t:Column width="auto">

                        <Label text="Arrival" />

                        <t:template>

                            <Text text="{ARRIVAL}" />

                        </t:template>

</t:Column>

this does not (nothing is displayed):


<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns:c="sap.ui.core"

    xmlns:f="sap.ui.layout.form" xmlns:l="sap.ui.layout" xmlns:t="sap.ui.table"

    xmlns="sap.m">

<t:Table id="idUrgencyOfRequests" rows="{/ChargingOrders}">

<t:Column width="auto">

                        <Label text="Arrival" />

                        <t:template>

                            <Text

                                text="{path: 'ARRIVAL',

                                       type: 'sap.ui.model.type.DateTime',

                                       formatOptions: {pattern: 'yyyy-MM-dd\'T\'HH:mm:ss',

                                                       UTC: true}

                                      }" />

                        </t:template>

</t:Column>

Any ideas?

Best Regards,

Tobias

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

is it a caching issue?   can you close your browser windows completely and retry??

can you show a screenshot?

Former Member
0 Kudos

No, its not a caching issue. I did a complete retry (several times).

This is a screenshot to the first code snippet (Labels are all german, problem occurs at columns 3 and 4, "Von" and "Bis").

This is the second snippet.

SergioG_TX
Active Contributor
0 Kudos

so columns 3/4 map to path: ARRIVAL ?

do any other formatting works or just this one ?

Former Member
0 Kudos

No, they map do different columns, my code snippets do not show the complete coding.

Unfortunately this was meant to be my first formatter, so i do not know if others work.