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 / Current Date (without ...
Power Automate
Unanswered

Current Date (without time ) to Excel as a Date format merrygoround...

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

As per subject, current date (without time) formatted as a date so i can write it to Excel.

What bloody annoys me is the option is there "current date only " or "current date and time" 🙄

 

Thanks, Mike.

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

    Everything you need to know on Dates:

    https://www.linkedin.com/pulse/power-automate-desktop-pad-best-practices-part-1-date-michael-annis/

     

    Here's a quick example:

     

    MichaelAnnis_0-1643299365645.png

    Let me know if you need help, but the article has everything spelled out.

     

    Good luck!

  • UK_Mike Profile Picture
    on at

    Hi Mike,

     

    Ive decided to make a very large pot of coffee...

    Jeez...

    Erm... I will come back to ya.

     

    Many thanks as always.

     

    I hereby accuse Microsoft of employing at least 1 sadist... 

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Yeah, this one baffles me why conversion isn't included, but we can get there.  I have a "Get Dates" subflow that I built once and copy flow to flow.  So it gets:

    • Today
    • Yesterday
    • Beginning Day This Month
    • Ending Day Last Month
    • Beginning Day Last Month
    • Ending Day Previous Month

    All of those in both Date and Text formats, and then I just make changes as I need, because sometimes I need MMddyyyy, but sometimes MM.dd.yy, so the text format changes constantly.

     

    You shouldn't have an issue.

  • UK_Mike Profile Picture
    on at

    Hi Mike,

     

    Tried but failed miserably....... in the end my frustrations got the better of me.

     

    I tried copying your code into a blank flow but there was a lot of errors, am I supposed to have something preceding your code ? I will definitely keep that one as a separate flow to call upon.

     

    It would help me greatly if you could provide me with current date in Euro format, 27/1/22, formatted as a date for writing to Excel.

     

    You name it, I tried it, splitting text etc.

     

    Thanks, Mike.

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Apologies...my code may be outdated...I am on 2.8.  Lame, I know, but too many people complain about upgrading killing their bots and I don't have the time to upgrade safely.  

     

    Get Current Date and Time

    Format %CurrentDateTime% to Text Custom format d/M/yy to %TODA_dmyy_Slash%

     

    Make sure the M is capital.  Lowercase m stands for minutes, not month.

     

    Then you should be able to write %TODA_dmyy_Slash% to Excel.

  • UK_Mike Profile Picture
    on at

    Then you should be able to write %TODA_dmyy_Slash% to Excel.

    Isnt that just a text value ?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Right, but if I paste a text value in a date format into Excel, doesn't Excel typically recognize that it's a date and format appropriately?  There may be slight differences because of the UK US formatting, but try the "ShortDate" method, because I think your regional settings should put it to the proper short date format.

    MichaelAnnis_0-1643304939061.png

  • UK_Mike Profile Picture
    on at

    I can write the date I require or any other date etc no problem to Excel, its just that Excel recognises it as text, not a date format.

    In the meantime ive been hardcoding =TODAY()       , its getting me by but not ideal lol.

     

    Column is already formatted as date but Excel still converts it to text.

     

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Mike, I would get with @Anonymous and see if he knows how it rectified itself:

     

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Date-Format-not-exporting-correctly-from-PAD-to-Excel/m-p/1255552

     

    I have another suggestion in that post for pasting the US date and then using the UI elements to convert the column to a different date format.  

  • UK_Mike Profile Picture
    on at

    Hey Mike,

     

    Im giving up at this stage lol, messing about with Excel, attached a pic.

    If its not self explanatory, a simple text file was read, contents were 27/1/22

    2 variables were read plus manually inputted 27/1/22

    Columns were formatted as per headers...

    Even the CurrentDateTime var which is a date variable aligns left ?

     

    Screenshot 2022-01-27 193929.png

     

     

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 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard