Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Remove zeros from email

(0) ShareShare
ReportReport
Posted on by 1,710

Hello everyone !

I am trying to create a calculated column which shows the number of days' difference between two columns which have dates in them. I understand that I can get this with the following formula:

 

=DATEDIF([Column 1],[Column 2],"D")

 

 

But when i trigger the calculated column in a flow and show the days calculated in an email it look likes for example:

In the list it shows the number without zeros:

So what i should use in the formula or in flow to remove all the zeros ? Any help would be appreciated.

Thank you!

  • EBMRay Profile Picture
    1,710 on at
    Re: Remove zeros from email

    Thank you! It works.

  • Pstork1 Profile Picture
    66,797 Most Valuable Professional on at
    Re: Remove zeros from email

    Hover over the field that you put into the email in the past.  That should show you what the code is in your flow.  Just use that and put it inside an Int().

  • EBMRay Profile Picture
    1,710 on at
    Re: Remove zeros from email

    @Pstork1 

    I am not using the Get_items action, i am using when an item is created so what it should be my expression ?

    Capture.PNG

  • Verified answer
    Pstork1 Profile Picture
    66,797 Most Valuable Professional on at
    Re: Remove zeros from email

    Sorry, I forgot this was the formula in a calculated column.  What I should have said is put an Int() around the calculated column in the Flow when you insert it into the email.  I did a test and my column was called 'Caculated2'.

    int(body('Get_item')?['Calculated2'])

    The column is already set to be a number, but when you put it into the email you need to specify that you want an integer. 

  • EBMRay Profile Picture
    1,710 on at
    Re: Remove zeros from email

    @Pstork1 

    I have used the formula you mentioned but it keeps showing the zeros in the email. 

    I am not using this formula in the flow, i am using it in the column list.

    So i am only calling the Duration column  from the dynamic content in the send email action.

  • Pstork1 Profile Picture
    66,797 Most Valuable Professional on at
    Re: Remove zeros from email

    As I said, put the INT() around the result like this.

    =INT(DATEDIF(StartDate,EndDate,"yd"))

    The DateDif is generating something that is being interpreted as a whole number.  Putting that inside an Int() should get it interpreted as an integer instead. 

  • EBMRay Profile Picture
    1,710 on at
    Re: Remove zeros from email

    Hi @Pstork1,

    Nope, i am not using the integer function i am implementing this one:

    =DATEDIF(StartDate,EndDate,"yd")

    If i should use INT() what it would be the function ?

     

    Thanks

  • Pstork1 Profile Picture
    66,797 Most Valuable Professional on at
    Re: Remove zeros from email

    Have you tried putting an INT() function around the rest of the calculation?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >