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 Platform Community / Forums / Power Automate / "addDays" Expression E...
Power Automate
Answered

"addDays" Expression Error

(0) ShareShare
ReportReport
Posted on by 11

Hi All,

Is there any update in Power Automate? I have one flow which was working till yesterday but from today it is getting failed with this error.

"The execution of template action 'DateFilter' failed: The evaluation of 'query' action 'where' expression '@equals(addDays('1899-12-30', int(first(split(item()?['Due date'], '.'))), 'yyyy-MM-dd'), formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd'))' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."

The  Expression which is having  issue is :
"addDays('1899-12-30', int(first(split(item()?['Due date'], '.'))), 'yyyy-MM-dd')"

Raw data on which  above expression is  working : 

"Due date": "44302.5492361111"



Please let me know if anyone is having update on  this.

Thanks,
Sunny


Categories:
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey Mate, @SunnyChoudhary 

     

    Your Final Expression should be - 


    addDays('1899-12-30',int(float(first(split(string(outputs('Compose')), '.')))),'yyyy-MM-dd')

     

    CFernandes_0-1619543270795.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • SunnyChoudhary Profile Picture
    11 on at

    Hi @CFernandes ,

     


    Thank you for such  a quick response, I have updated my expression and added "float" in it but getting same error my old expression(in previous message) was working perfectly form last 3 months today suddenly it started giving error, the new expression looks like this:

    addDays('1899-12-30',int(float(first(split(item()?['Due date'], '.')))),'yyyy-MM-dd')

     

    Expression Error.JPG


    Error: The execution of template action 'DateFilter' failed: The evaluation of 'query' action 'where' expression '@equals(addDays('1899-12-30', int(float(first(split(item()?['Due date'], '.')))), 'yyyy-MM-dd'), formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd'))' failed: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

  • Verified answer
    SunnyChoudhary Profile Picture
    11 on at

    Hi All,

    Just to close this loop all the expressions mentioned in this forum are Correct, the problem was not in the expression it was in the data on which the expression was running. As I mentioned in my previous conversation my flow was working perfectly from last 3 months but from couple of days my raw data started getting blank values in column "Due date" (this never happened before) hence the flow was getting failed. I have fix this issue now by Combining "IF-ELSE" expression and  "addDays" expression.

    The Final Expression looks like this:

    if(not(empty(item()?['Due date'])), addDays('1899-12-30',int(first(split(item()?['Due date'],'.'))),'yyyy-MM-dd'), 'NA')
     
    I would like to thanks @CFernandes for such a quick response and trying to help.
     
    Expression Fixed.JPG

     

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey Mate @SunnyChoudhary , I am glad that your problem is resolved. Thank you for your kind words. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    Can you help me on fixing this error:

     

    Mainguyennn92_0-1673498144708.pngMainguyennn92_1-1673498160798.png

     

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
Mohsin Ali Profile Picture

Mohsin Ali 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard