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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert dateDifference...
Power Automate
Unanswered

Convert dateDifference to days

(0) ShareShare
ReportReport
Posted on by 1,164

Hi,

I have an output of -20:58:33.2982132 which is the result of running dateDifference from now to a Due Date field.

dateDifference(utcNow(),item()['DueDate'])

How do I convert this to days only? (I've tried split and substring functions but cant get it right)

Thanks in advance

Todd

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: Convert dateDifference to days

    Hi @Tango ,

     

    Please try

    div(sub(ticks(utcNow()),ticks(item()['DueDate'])),864000000000)

     

    Best Regards,
    Bof

  • jdavisp3 Profile Picture
    6 on at
    Re: Convert dateDifference to days

    The answers aren't really saying how to do this with dateDifference. You can use int and split:

    int(split(dateDifference(utcNow(), item()['DueDate']), '.')[0])
  • tbartman Profile Picture
    3 on at
    Re: Convert dateDifference to days
    Thank you jdavisp3 - that did the trick!
    concat(int(split(dateDifference(utcNow(),
    '2025-02-28'), '.')[0]), ' Days Remaining')

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard