cancel
Showing results for 
Search instead for 
Did you mean: 

Format data in smart template List report

akshaya_p
Contributor

I'm using a smart template and I want to format data that is coming up in the table. Any ways to do it?

gregorw
Active Contributor
0 Kudos

It would help if you could be more specific. Do you talk about values with a currency code, dates, time?

akshaya_p
Contributor
0 Kudos

I want to format Date. Since it is smart Template and the table is rendered automatically as a responsive table, I have no control from UI to format Dates.The table has say 5 columns, out of which one is date.

I want to format date like Mar 26,2018 that is coming from backend

akshaya_p
Contributor
0 Kudos

I also want to format time in another column. How do I go about achieving these?Please help

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor
0 Kudos

From what I see in the Smart Table example metadata you should be able to control the format with the attribute sap:display-format.

akshaya_p
Contributor
0 Kudos

Hi

Thanks for your response. But I have used the same. It still shows in the format m/dd/yyyy

<Property Name="Creationdate" Type="Edm.DateTime" Nullable="false" Precision="7" sap:display-format="Date" sap:label="Creation Date" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

gregorw
Active Contributor
gregorw
Active Contributor
akshaya_p
Contributor
0 Kudos

I'll get the ABAP developer to check this code.

METHODadd_date_display_format.


And also this date format is happening only in list report page, in object page it works fine.

SAPUI5 version of my backend system-1.38.6

akshaya_p
Contributor

Tried no luck.It displays in same format


date.png

akshaya_p
Contributor
0 Kudos

is there a method to format the date column from UI?