cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msross
Regular Visitor

Creating Calculated Field to pull date only from Modified On CDS Standard field

Hi all, 

 

First time posting an inquiry here. Let me know if I'm missing anything in order to help provide a solution:

 

I am trying to create an entity field that will reference the date only from a "Modified On" entity field that is a standard type field to my CDS entity. (EX: The Modified On field values typically looks something like: "2020-04-27T17:59:15Z" ; I would like to create a separate calculated field that references only "2020-04-27"). 

 

I appreciate any assistance in advance.

 

Thank you!

M. Ross


 

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @msross :

Do you want to get a value in "2020-04-27" format instead of "2020-04-27T17:59:15Z" ?

The point is whether "2020-04-27" or "2020-04-27T17:59:15Z" are just strings, they look different because they use different target formats when converting from time values to strings.

You can easily achieve it through the text function without creating new columns.

Text(The value of the specified date,"[$-en]yyyy-mm-dd")

Ive made a test for your reference.

My data source:Accounts()

1\Add a data table control

Items: Accounts

 

2\set the modified On columns text property to:

Text(ThisItem.'Modified On',"[$-en]yyyy-mm-dd")

 

I think this link will help you a lot:

Text function in Power Apps

Best Regards,

Bof

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (58,660)