Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

timestamp a file with a date range

(0) ShareShare
ReportReport
Posted on by 12

Hi everyone

 

Im a relatively new user of this automation, so apologies if any of this is silly stuff!

 

Anyway, I've modifed a template to transfer a file to sharepoint but I'd like to stamp it with the date from and date to to make sure I all dates are covered off when they come to be processed.  Using getpasttime will work with interval of 1, and another one of 8 will get the from and to date, but it has a lot of other useless info like time etc that I don't need.

 

I failed miserably with the compose function to try and change this as i think it sees the output as a string and so my googling ability to resolve gets stuck!

 

Could someone confirm what the compose would be to make the file have "file name + -8 days to -1 day" relative to todays date? 

 

Thanks

Cass

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: timestamp a file with a date range

    Hi @taxgeek2004,

     

    You could use the concat() function to connect "fileName" and date range. 

    For example:

    concat('fileName+',addDays(utcNow(),-8,'yyyy-MM-dd'),'to',addDays(utcNow(),-1,'yyyy-MM-dd'))

     Screenshot 2020-10-07 145810.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492