Date format change

My datable is
Id Startdate

  1.   2020-05-21
    

But while paste to CSV file it automatically changed to 05/21/2020 how to paste extactly as 2020-05-21

@brindhaS

Try changing datatype of column date by using the activity in marketplace below
Datatable - Change Column Datatype - RPA Component | UiPath Marketplace

If you dont want to use it, you can try this approch as well…

Step 1: Read CSV
Step 2: Use Output Data Table activity to get in memory string
Step 3: Use Generate Data Table activity to get final output data table. Please use setting shown in following image.

“Disable Autodetect datatype”

image

I’m sorry, while writing in CSV file.the format is changing like my datatable value is 2020-05-21 when writing it changes to 05/21/2020

May I misunderstood please help me with this

@brindhaS,

I am not getting it, can you please help me with screenshot

Hello @brindhaS

As you are writing to CSV it will write the actual date which is in the format of Datatable

But when you open CSV file by using Excel, It will be formatted by Excel

If you open in notepad, it will show you the actual format which is written to CSV file

check below

Hope this helps you

Thanks

1 Like

Thank you so much

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.