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 / How to use date format...
Power Automate
Answered

How to use date formatting in datatable

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I have a datatable that gets its data from a website using the 'Extract data from webpage' action. In column 5 is a list of dates. However when i want to write the data to an Excel file it keeps formatting the dates to mm-dd-yyyy excepts when the monthnumber is bigger than 12. Then it uses dd-mm-yyyy. How do i format the column in the table that it always writes dd-mm-yyyy?

 

Note: i have Power FX enabled in PA desktop.

 

RPJ_0-1709565808859.png

 

I have the same question (0)
  • Gidi Profile Picture
    601 on at

    Hi RPJ,

    please check the data format of the column values. Usually they are text and you need to convert it to date before writing it to excel. 

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @RPJ 

     

    Could you please share your system/VM datetime format?

     

    I believe it would be written based on your system date format only.

     

     

  • RPJ Profile Picture
    19 on at

    Hi Gidi, Could you please explain where i could check the data format? When i run the web extract it shows the datatable but i cant seem to edit it.

  • RPJ Profile Picture
    19 on at

    Hi @Deenuji,

     

    When i use the action get current date/time it gives the result below. In the variable itself it gives the wrong dateformat, however when i click on the variable on the right it opens the variable in the wrong format. Do you know where i should change it?

    RPJ_3-1709623816449.png

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    Hi @RPJ ,

     

    Could you please share your computer date and time format screenshot like below? Also could you pls confirm what PAD version you are using in your machine?

    Deenuji_0-1709624061482.png

     

     

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @RPJ 

     

    I understand the problem you're facing. It seems that your computer's date format is set to 5-3-2024, which is why it's displaying values in that format.

     

    I was able to reproduce the issue by changing my system's format on my machine.

    Deenuji_0-1709625323317.png

     

     

    Simply adjust your system's date format as needed, and when writing data to the Excel file, it will automatically reflect your system's  date format. Hope this solution helps!

  • RPJ Profile Picture
    19 on at

    Hi @Deenuji ,

     

    My current format is:

    RPJ_0-1709626092032.png

    This is the correct format. I have looked at the options to change this format, but currently this is already the correct format. After running the proces again the dates in excel still had the format mm-dd-yyyy. The red cells are in the wrong format and the green ones correct. Are there other places where i should format the date?

    RPJ_1-1709626215703.png

     

     

  • RPJ Profile Picture
    19 on at

    @Deenuji I am currently using the newest version of PAD

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @RPJ 

    The DataTable writing in excel is functioning correctly for me. The dates within the DataTable were formatted based on the system's date format.

    Deenuji_1-1709633190184.png

     

    Register this portal with you email id - ACME System 1 - Log In (uipath.com) and Login into this portal in chrome browser and try the below example.

    Deenuji_0-1709632946937.png

    Code:
    WebAutomation.LaunchChrome.AttachToChromeByTitle TabTitle: $'''ACME System 1 - Work Items''' AttachTimeout: 5 BrowserInstance=> Browser
    WebAutomation.ExtractData.ExtractHtmlTable BrowserInstance: Browser Control: $'''html > body > div > div:eq(1) > div > table''' ExtractionParameters: {[$'''Actions''', $'''WIID''', $'''Description''', $'''Type''', $'''Status''', $'''Date'''], [$'''''', $'''''', $'''''', $'''''', $'''''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
    Excel.LaunchExcel.LaunchUnderExistingProcess Visible: True Instance=> ExcelInstance
    Excel.WriteToExcel.WriteNamedCell Instance: ExcelInstance Value: DataFromWebPage CellName: $'''A1'''

     

     

  • Gidi Profile Picture
    601 on at

    try it indirect with action convert text to date and check on error

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 259 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 177 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard