Unable to change Date format in Uipath



Hello everyone,
I have been trying to merge two excel sheets with different date formats in them but I am getting the number of days instead of the date in the short date format. One format is “08-Feb-02” while the other is “01-01-1999” and I want it in “01-01-1999” format. Can anyone please help.

Change dateformat in row of datatable

hi @jamnanin,

use this code to change date format (08-Feb-02 to 08-02-02)
DateTime.ParseExact(“08-Feb-02”, “dd-MMM-yy”, CultureInfo.InvariantCulture).ToString(“dd-MM-yy”)



hi arivazhagan,
but where do i change it in the sequence


Hi @jamnanin,

you are assign something to Values what is that???



I am selecting the columns that I need by assigning “testRow.Select.CopyToDataTable().DefaultView.ToTable(False, “ID”, “Name”,“Insurance Amount”,“Dob”)” to values


Hi @jamnanin,

Can you give more detail to better understand. Give some sample data with your xaml file



this is the 1st file and
this is the 2nd file
and this is what i want as my final output

If you could send me a sample xaml on how to do this would be of great help. Thank you


hi @arivu96,

is there a way to do this? I just want to know in which activity do i use the code? should i use an assign activity? if yes then what should i assign it to?


Hi @jamnanin

yes, its possible. refer the xaml files.
MainDateFormatchange.xaml (13.1 KB)
input 1.xlsx (7.5 KB)
input 2.xlsx (7.5 KB)
Result.xlsx (8.7 KB)



thanks a lot arivu for taking your time to help me out.