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 / 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,960 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard