Hi,
I have a string 01.01.2019 and I need to add here one year. I cannot convert this string to date and then add Thanks for help
Hi,
I have a string 01.01.2019 and I need to add here one year. I cannot convert this string to date and then add Thanks for help
Hi @Marek_Matuszak, kindly check this code to add one year to given date in string
given_date = "01.01.2019"
next_date = DateTime.ParseExact(given_date, "dd.mm.yyyy", System.Globalization.CultureInfo.InvariantCulture).AddYears(1).ToString("dd.mm.yyyy")
Output is :
Hope it helps you
Mark it as solution if you got it
Regards
Nived N
Happy Automation
Hi @Marek_Matuszak,
Simplest thing you can do is :
String = “01.01.2019”
Cdate(String).AddYears(1).toString("dd.mm.yyyy")
Cheers