on 12-14-2018 6:43 AM
Hi all,
we have a OData service generated for list report in which one of the field in metadata.xml is Edm.String which is maintained as in back end which is a 8 character field as below
<Property Name="Start_date" Type="Edm.String" MaxLength="8" sap:display-format="NonNegative"/><Property Name="End_date" Type="Edm.String" MaxLength="8" sap:display-format="NonNegative"/>
This field when used as a UI DataField in local annotations as below
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="voyage_start"/>
<PropertyValue Property="Label" String="Voyage Start"/>
</Record>
we are getting the format as string as below
Regards
Prasad
Hi Prasad,
I can see that the property metadata shows it is of type string. It ideally should of type date time then SAP will automatically converts it for you.
You can change the property type to datetime and check the output. But if you don't want to do that, then you have to do a column extension and do the formatting manually I guess so better update the property
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://ui5.sap.com/#/topic/28e95702b5854b938ac51c4bc2d078ab
You can generate extensions using webide as well.
Any reason they you don't want to change the type to date in odata service?
Mahesh
Hi Prasad,
Check the link below
https://answers.sap.com/questions/745501/change-data-format-edmdatetime-to-show-only-date-i.html
BR
Mahesh
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.