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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send email every 14 da...
Power Automate
Answered

Send email every 14 days after Due Date in Power Automate – float() error

(0) ShareShare
ReportReport
Posted on by 9

Hi everyone,

I'm trying to build a Power Automate flow that sends a recurring reminder email every 14 days after the Due Date – so on day 14, 28, 42, etc. – as long as the status is still active (for example: "Open", "Reopen", or "Monitor").

This is the expression I'm currently using in my condition:

mod(float(split(dateDifference(formatDateTime(utcNow(),'yyyy-MM-dd'), formatDateTime(item()?['field_17'], 'yyyy-MM-dd')), '.')[0]), 14)
 

Although the email does get sent, I keep getting the following error in the flow run history: The template language function 'float' was invoked with a parameter that is not valid. 
The value cannot be converted to the target type.

How can I safely rewrite this expression so that it:

Sends an email every 14 days after the due date

Doesn't throw errors if the field is empty or badly formatted

Works consistently and reliably?

Thanks in advance for your help!

 

 

Best regards,

Nuran

Categories:
I have the same question (0)
  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Super User 2025 Season 2 on at
    After the For each block (not inside the loop, but outside the loop), add a Compose and throw any value in it e.g. ok
    Configure the Run After property as shown below
     
  • Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at
    If the difference between the two dates is less than one day, the return value of the dateDifference function will be different (there is no '.', hence the first item of the split is not convertable to float). To avoid errors, check this in advance.
  • Verified answer
    VictorIvanidze Profile Picture
    13,073 on at
    Try to use this:
    mod(int(first(split(dateDifference(formatDateTime(utcNow(),'yyyy-MM-dd'), formatDateTime(item()?['field_17'], 'yyyy-MM-dd')), '.'))), 14)
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard