Skip to main content

Notifications

Power Automate - Using Flows
Unanswered

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.'.
  • Suggested answer
    FLMike Profile Picture
    FLMike 29,105 on at
    Need to get the days different between excel date and current date
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics

Restore a deleted flow