While reading an excel sheet, the format of date in column changes

I have an excel sheet as:

Jan-20 aa vvv
Feb-20 hh ee

When I use read range And read this excel file to a data table it becomes as
01-01-2020 aa vvv
01-02-2020 hh ee

I need the datatable as
Jan-20 aa vvv
Feb-20 hh ee

How to make as this…please anyone help me?

1 Like

@rifnanahas

You need to change the column format in excel file first and then check it.

@lakshman

I am also facing same problem how to change column format.

@rifnanahas

When you use excel application scope in “Read Range” activity please tick "PreserveFormat"

:innocent:

I tried this one but instead of Jan-20, Its showing like 20-Jan

Once after getting like this
Use a FOR EACH ROW activity and pass the above datatable variable as input
—then inside the loop use a Assign activity like this
row(“yourcolumnname”) = DateTime.ParseExact(row(“yourcolumnname”).ToString.SubString(0,10),”dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMM-yy”)

This will Change to the format you want

Cheers @rifnanahas

@rifnanahas

When you use excel application scope in “Read Range” activity please tick "PreserveFormat"

In Your Excel select column and in Format Cell select option in following screenshot

1 Like