How to add +1 day in excel

Hello guys i have an excel with column name date, how can i add +1 day every i run the automation? Example when i run the automation the date is 10.11.2022 , after that run i want the date change to be 11.11.2022

Hi @Kelvin1,

Do you want to update the date value in the same column.

Regards,
Arivu

HI,

If your target data exists as Text in the cell, the following will work.

image

Sample20221121-2.zip (8.5 KB)

strDate = DateTime.ParseExact(strDate,"dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture).AddDays(1).ToString("dd.MM.yyyy")

If your target data is formatted as “dd.MM.yyyy” style in the cell, the expression might be as the following.

strDate = DateTime.Parse(strDate).AddDays(1).ToString("MM/dd/yyyy")

Regards,

Hi @Yoichi thanks for the answer. Gonna try it , i will let u know the result

Hi @Kelvin1
(Currentrow(column name)).adddays(1).ToString if the column has datetime value.

Hi @Yoichi Why it give me error like this
strDate = DateTime.ParseExact(strDate,“dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture).AddDays(1).ToString(“dd.MM.yyyy”) i tried this one
image

Hi,

Did you set strDate at Result of ReadCell activity?
If yes, can you check content of strDate variable at LocalsPanel when error occurs in debug mode?

Regards,

Hi @Yoichi , ah i see i forgot to add read cell acitivity. Thank you sir it worked

1 Like

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