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 / Date format conversion
Power Automate
Answered

Date format conversion

(0) ShareShare
ReportReport
Posted on by 6

I am trying to set up a power automate flow to move a file from one directory to another.  The file that I am moving has a naming convention that is consistent with the exception of the date attached for each day the file is generated.  

In theory this is fairly simple, here are the steps I am taking.
1. Get current date and time - Variable result = 11/24/2022 12:00:00 (I suspect Power Automate is adding the time but should not be since I am only asking for the date to be retrieved)

2. convert datetime to text - Variable result = 11/24/2022

3. format date - Variable result = 20220024 which is incorrect(YYYYMMDD)

The same result occurs when I change the format to MMDDYYYY or MM/DD/YYYY

 

I am sure I am missing something simple but Any help to a fix would be greatly appreciated

 

Thank You,

Demuris 

Picture1.jpg
Categories:
  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    Hey @Demuris 

     

    Actually whats happening is you are using Lower mm for getting month. But lower mm are used for minutes. 

    To get month you will have to write capital MM.

     

    so your expression should look like:

     

    yyyyMMdd

     

    Sundeep_Malik_0-1669365700007.png

     

    Sundeep_Malik_1-1669365718327.png

     

    Sundeep_Malik_2-1669365733589.png

     

    Sundeep_Malik_3-1669365752621.png

     

  • Demuris Profile Picture
    6 on at

    Thank you, I figured it was something simple that I was overlooking.  Appreciate the support!

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard