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 / calculate how many day...
Power Automate
Answered

calculate how many days the sharepoint file was created

(0) ShareShare
ReportReport
Posted on by 102

Eu preciso calcular quantos dias o arquivo do sharepoint foi criado, o que eu pensei que era para usar a função utcnow() - data de criação do arquivo do sharepoint. Mas como fazer essa conexão?

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,983 Most Valuable Professional on at

    Hi @jurunas2023,

     

    You could use an expression with a dateDifference function for this.

     

    dateDifference('<startDate>', '<endDate>')

     

    Below is an example

     

    dateDifference(outputs('Get_file_properties')?['body/Created'],utcNow())

     

    datedifference_function.png

     

  • jurunas2023 Profile Picture
    102 on at

    Now, how do you convert the function value to days?

    For example: the date created is 2022-12-28T20:27:50.000000Z and today's date as end gives the following number -2.01:16:29.7916441

     

  • Verified answer
    Expiscornovus Profile Picture
    33,983 Most Valuable Professional on at

    Hi @jurunas2023,


    That is -2 days. So, if you only want the days you should be able to use a split function for that (with a split on the dot character). 

     

    split(dateDifference(outputs('Get_file_properties')?['body/Created'],utcNow()), '.')[0]

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 259 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 177 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard