cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Date field is missing the time section (hh:mm:ss) in CDS Get Record action

Hello,

 

I have encountered a strange problem with the CDS Get record action. My understanding is that a date field in Dynamics stores the date in UTC timezone and displays the date back to user based on user's timezone. If i use the Level Up Chrome Extension to view all the fields of a record in Dynamics 365, i can see the date field stored as a complete timestamp in UTC.

Data in Dynamics Form:

Timestamp_D365_Form.PNG

 

Data using Chrome Extension:

 

Timestamp_D365.PNG

However when i retrieve the same record in a flow using the CDS Get record action, the same field displays only the date of the UTC timezone when it had to display the complete timestamp.

 

Data output of CDS Get_Record action:

Get_Record_Output.PNG

 

 

Data output of CDS Get Record action with some fields spitting out the complete timestamp:

Get_Record_Output_With_TimeStamp.PNG

 

Any suggestions how i can retrieve the complete time stamp for the date fields? Thanks in advance.

 

Regards,

Nithin

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Entity fields are not displayed in CDS Update Record action

Hi @Nithin_Vanam 

 

I have tested this and these are my findings.

 

First I create two date columns Start Date (Date Only Format) and End Date (Date Time Format)

 

I have entered some data (dd/MM/yyyy) against these columns.

Start Date: 11-03-2020

End Date:  18-03-2020 17:00:00

 

Flow CDS Get Items returned the date values as follows:

 

Start Date 

2020-03-11 
 
End Date
2020-03-18T17:00:00Z
 
Which is expected.
 
I did checked the results with Level Up extension and it did showed the below result
Start Date
2020-03-11T00:00:00Z
 
End Date
2020-03-18T17:00:00Z
 
Believe the D365 UI hiding the formats because we set the Start Date data type as Date only. 
 
So far so good and all working as expected.
 
Next I changed the End Date column type to Date only.
 
Here are my results from CDS
 

Start Date 

2020-03-11 
 
End Date
2020-03-18
 
Level Up here are the result
Start Date
2020-03-11T00:00:00Z
 
End Date
2020-03-18T17:00:00Z
 
So the difference here is the old data still in database but masked out by Dynamics UI because we changed the End Date to Date only format but Level Up still shows all datetime.
 
Looks like your schema might have changed and displaying only Date format in D365 UI.
 
If you want the datetime then you may need to change the CRM field schema to DateTime so that CDS Get Items can get the data in datetime format. 
 
Conclusion:
D365 UI is doing the masking of DateTime / Date only format
Also when it stores the date in Database it stores the Date only format time as 00:00:00z
Level Up not doing any masking it is showing the DateTime exactly as it is.
Make sure your schema DateTime format is changed or not? You may be looking the historical data here.
To prove it add a new record and test.
 
Hope it make sense.
 
Thanks
 
 
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

5 REPLIES 5
Super User III
Super User III

Re: Entity fields are not displayed in CDS Update Record action

Hello,

Try and use the Date time action - Convert time zone.

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Helper II
Helper II

Re: Entity fields are not displayed in CDS Update Record action

Hi @Jcook ,

 

The issue is, when a record in CRM is saved with a date 12/03/2020, in CDS it is stored as 11/03/2020 14:00:00 UTC (Based on my local timezone - AU). Now if i access that field in a flow, i only get 11/03/2020 without the time. Even if i use Convert Time Zone action ( i have tried this), it takes the base time as 11/03/2020 00:00:00 and then converts it to my local timezone which is UTC + 10. So the converted time is still 11/03/2020 10:00:00 instead of 12/03/2020 00:00:00. 

 

Unless i get the right timestamp there is no use in converting the timezone. I will have to account for the missing timestamp in my logic. Wanted a confirmation if this is the only way to tackle this or if i messing something up. Thanks.

 

Regards,

Nithin

Highlighted
Super User III
Super User III

Re: Entity fields are not displayed in CDS Update Record action

Hi @Nithin_Vanam 

 

I have tested this and these are my findings.

 

First I create two date columns Start Date (Date Only Format) and End Date (Date Time Format)

 

I have entered some data (dd/MM/yyyy) against these columns.

Start Date: 11-03-2020

End Date:  18-03-2020 17:00:00

 

Flow CDS Get Items returned the date values as follows:

 

Start Date 

2020-03-11 
 
End Date
2020-03-18T17:00:00Z
 
Which is expected.
 
I did checked the results with Level Up extension and it did showed the below result
Start Date
2020-03-11T00:00:00Z
 
End Date
2020-03-18T17:00:00Z
 
Believe the D365 UI hiding the formats because we set the Start Date data type as Date only. 
 
So far so good and all working as expected.
 
Next I changed the End Date column type to Date only.
 
Here are my results from CDS
 

Start Date 

2020-03-11 
 
End Date
2020-03-18
 
Level Up here are the result
Start Date
2020-03-11T00:00:00Z
 
End Date
2020-03-18T17:00:00Z
 
So the difference here is the old data still in database but masked out by Dynamics UI because we changed the End Date to Date only format but Level Up still shows all datetime.
 
Looks like your schema might have changed and displaying only Date format in D365 UI.
 
If you want the datetime then you may need to change the CRM field schema to DateTime so that CDS Get Items can get the data in datetime format. 
 
Conclusion:
D365 UI is doing the masking of DateTime / Date only format
Also when it stores the date in Database it stores the Date only format time as 00:00:00z
Level Up not doing any masking it is showing the DateTime exactly as it is.
Make sure your schema DateTime format is changed or not? You may be looking the historical data here.
To prove it add a new record and test.
 
Hope it make sense.
 
Thanks
 
 
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Helper II
Helper II

Re: Entity fields are not displayed in CDS Update Record action

Hi @abm ,

 

Let me give this a go. Will post back my results. 

 

Just to confirm again, you are suggesting me to change the date field to date and time and then check with the CDS action? Thanks.

 

Regards,

Nithin

Highlighted
Super User III
Super User III

Re: Entity fields are not displayed in CDS Update Record action

Hi @Nithin_Vanam 

 

Yes that's correct.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,561)