Change The Date Format Inside The Column of Data Table

Hello, everyone. I’m kind new with UiPath. I tried to change the formatting of my date inside column in dataTable. The input format is kind like this “08/05/2020 00:00:00”, the output I expect is like this “5 Aug 2020”. For what I’ve done is like this

for each row in dataTable{
dateChange = row(2).ToString(“d MMM yyyy”) // assume the column index is in 2nd index.
}

I got error that told me dissallows implicit converstion String to Integer. Any guidance of you help me a lot.

Thanks in advance.
@kristoff

1 Like

Hello @kristoff,

Input Date Format : “08/05/2020 00:00:00” [dd/MM/yyyy HH:mm:ss]
Output Date Format : “5 Aug 2020” [d MMM yyyy]

ConverteDateStr = Date.ParseExact(row(2).ToString,“dd/MM/yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).ToString(“d MMM yyyy”)

Hope that helps ! Kudos :slight_smile:

Regards,
Nithin

1 Like

Thanks a lot @Nithin_P. It help me so much.

1 Like

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