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 / Help needed with renam...
Power Automate
Answered

Help needed with renaming file by adding datetime - can't seem to work with custom format?

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

I have a flow where I want to rename files by adding the datetime of when the file was last accessed in the date format ddmmyyyy hh:mm.

 

However, I can't seem to get it to work.  It only seems to work if I use the default format that the menu gives (it is prefilled) and then I add hh:mm to it.  I think it's yyyyMMdd hh:mm.

 

You can see how it looks below:

ianwuk_0-1677389397258.png


I want the datetime format to be ddmmyyyy hh:mm instead.  But when I put that as the Datetime Format and click Save and run my flow, the file doesn't get renamed - what am I doing wrong?

Many thanks for any help!

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Use capital MM for month. 

  • CU-19081228-9 Profile Picture
    on at

    Thank you @MichaelAnnis for helping.  I'll give that a try and get back to you.

     

    Why do I need to have MM in capitals?  What is the reason?

    Thanks.

  • CU-19081228-9 Profile Picture
    on at

    @MichaelAnnis Unfortunately, updating the datetime format to ddMMyyyy hh:mm doesn't work.  Now the files are not renamed at all.

     

    Here is how the part of my flow looks:

    ianwuk_3-1677401089850.png

     



    It is the final rename step I cannot get to work.  It looks like this:

    ianwuk_2-1677400979718.png

    Any further help is much appreciated - thank you!

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    MM is month

    mm is minutes

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    What if you mark the “use custom date time” to true. Since you aren’t using a default. 

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Hi @ianwuk 

     

     

    A file name cannot contain ":".

    Kaif_Siddique_0-1677441160009.png

    Use Datetime format without ":" --> ddMMyyyy hhmm

    Kaif_Siddique_1-1677441474713.png

     

    If I have answered your question, please mark my post as Solved.

    If you like my response, please give it a Thumbs Up.

     

    Regards

    Kaif

  • CU-19081228-9 Profile Picture
    on at

    Thank you both @Kaif_Siddique  and @MichaelAnnis

    I managed to get the datetime correct.  It's funny that you mentioned the filename cannot contain special characters. 

    Maybe it is just me, but if you mouseover the help for DateTime it includes examples, and that has a : in it.

     Thank you so much both of you for the help - much appreciated!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard