How to change different date formats in a column

Hi @anjani_priya ,

Could you maybe check with the below Workflow :

Excel_FormatDates.zip (16.0 KB)

From the Statements received, we see that only the Month and Year is present as a text format, so the information on the day is not present, hence we will take it as current date’s day value.

So, we would require to convert it to a Date value at first then register/enter it into the Excel sheet and then use Format Cells activity to format it to the required format.

There is a difference in the original date value format, however it is understood as date value.

Let us know if it does not suit your requirement.

Capture34
Its changing like this.

Capture35
I want in this format

@anjani_priya ,

Could you let us know if you have provided a different sheet as input or is it the same sheet (input3) from the Sample Excel sheet provided above ?

I gave sample sheet to you and made changes of the code in my original sheet

@anjani_priya ,

The Output is in the below format on my side, I had changed the sheet name in the workflow from input3 to input.
image

Could you make sure and check if you have changed all the sheetname to the source sheet name in the workflow?

If I have multiple sheets then?

@anjani_priya ,

An Initial analysis could be done by checking the Other Excel related activities present. There is a For Each Excel sheet activity which should work with the current configuration set up in the workflow.

1 Like

may ends with 31 but it didnt reflect.It just got 30 in date.

@anjani_priya ,

I believe you would require to get the End Day of Month, in that case, you can update the assign activity with the below Expression :

DateTime.ParseExact(CurrentRow("Month").ToString,"MMM\'yy",System.Globalization.CultureInfo.InvariantCulture).AddMonths(1).AddDays(-1).ToString

no chance
may doesnot reflect as 31st

@anjani_priya ,

You could just copy the same Expression as mentioned above to the Assign activity. The Ending .ToString(...) is not required.


got an error

@anjani_priya ,

Could you update it with the below and check :

CType(DateTime.ParseExact(CurrentRow("Month").ToString,"MMM\'yy",System.Globalization.CultureInfo.InvariantCulture).AddMonths(1).AddDays(-1).ToString,UiPath.Excel.ExcelValue)
1 Like

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