How to change date in right format for column of excel using uipath

I want to copy date from one column of excel sheet and paste into another column of excel sheet. The original date is"13-Jan-21" format required format is “JAN-13”. and this change has to apply for entire column. I tried
PO_date = DateTime.ParseExact(gtdate,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMM-dd”) but getting error 'Option strict On disallows implicit conversions from Date to string.

1 Like

Hello, and welcome to the forum!

It seems that the type of gtdate is Date and not String. So this should be enough:



HI @Kanchan_Gawande

You can try this use change cell type of Bale Reva excel activities

Give your cell range
And give your format


1 Like

hi Charbel

I tried that but it doesn’t work

Hi @Kanchan_Gawande ,

Input parameter for dateTime.ParseExact is string so we have to provide datefprmat in string. As per your post we understood that the gtdate is date type. Could you try like below and let us know. Thanks.

PO_date = DateTime.ParseExact(gtdate.tostring,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMM-dd”)

And also refer the below documentation which is having different methods to convert date format to desired format. Thanks.

Hi @Kanchan_Gawande

To do the entire column, you have applied like this.

Thank you @Sudharsan_Ka


1 Like

Thanks for you @balupad14 it’s super helpful


1 Like

Thank you sir it is very helpful

1 Like

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