Notifications
Announcements
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?
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())
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
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 523 Super User 2025 Season 2
Tomac 406 Moderator
abm abm 245 Most Valuable Professional