Have you noticed that when you have calculated fields that for example displays the difference between two date fields in SharePoint and Microsoft Flow you will get a number like 13.00000000000 returned:

Handling calculated fields in Microsoft Flow Microsoft Flow difference with 000000

 

This is not always what you want, is it?

Handling calculated fields in Microsoft Flow Microsoft Flow 13

There is an easy way to clean this up:
 

 

Below you can see Compose 2 simply displaying the Difference field and the result will include all the 0s.

Handling calculated fields in Microsoft Flow Microsoft Flow two compose actions on with difference and one with the cleanup
 
The second Compose action uses the following expression.
 
first(split(triggerBody()?['Difference'],'.'))
 
 

References

Split function

first function

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading