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 / Need to get the days d...
Power Automate
Suggested Answer

Need to get the days different between excel date and current date

(1) ShareShare
ReportReport
Posted on by 2
Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '45605.0555555556' was not valid. The datetime string must match ISO 8601 format.'.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,690 Super User 2025 Season 2 on at
    Hi,
     
    It looks like you are getting back a String value of that Date in Ticks and thats the issue.
     
    You need to convert it, firstly to a number (get rid of the .0555 garabage), and then turn those Ticks into a DateTime.
     
    That's why its not working
     
    Also when you do this, you need to make sure that you have a DateTime for both in the same format or use FormateDateTime in the flow to make them the same.
     
    To convert from that to a number do int(yourstringhere)
     
    Then do this to convert that into a DateTime
     
    addSeconds('0001-01-01',div(YourTicksValue),10000000))
    Then use dateDifference
     
    or you can also follow this, it's simply a pivot on the above but works nicely
     
     

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard