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

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,183 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,183 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

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

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard