web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

If condition

(0) ShareShare
ReportReport
Posted on by 27

Hi,

I am new to power automate.

I am trying to get the difference btw two date fields "Date Reported" and "Email Sent' from sharepoint and if the number of days is greater than 10 days send mail Notification.

My flow is : 

dateDifference(item()?['DateReported'],item()?['EmailSent'])

 

iwsejet_2-1695765069572.png

 

The above flow is failing with error Unable to process template language expressions for action 'Condition_2' at line '0' and column '0': 'The template language function 'greater' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'.

 

As an option2: I have a column in Sharepoint "Date Lapse" which has already calculated the difference just need to do the "if the number of days is greater than 10 days". My problem is I am not able to do the If stt greater than 10 days

iwsejet_0-1695766471864.png

 

 

Thanks in advance.

 

 

Categories:
  • iwsejet Profile Picture
    27 on at

    Edited my question and posted in the original

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @iwsejet ,

     

    The return value of datedifference is a string something like :

    "1268.00:00:00"

    Please try:

    int(split(dateDifference('2015-02-08', '2018-07-30'),':')[0])

     

    Best Regards,

    Bof

  • iwsejet Profile Picture
    27 on at

    Hi,

    Thank you it worked for static dates, but when I use the dynamic content from sharepoint ( Date & time format column is used) it throws error.

    iwsejet_0-1695823975390.png

     

    int(split(dateDifference(item()?['DateReported'],item()?['EmailSent']),':')[0])

    iwsejet_1-1695824083797.png

     

    Can you share your thoughts.

    Thanks.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @iwsejet ,

     

    The point is that the value of item()?['DateReported'] is null.

    vbofengmsft_0-1695864172048.png

     

    Best Regards,
    Bof

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard