How to add months to a date

Hay All,

Need your help in adding one month to a date which is in format DateTime.
I used: sr.AddMonths(1)(where sr is the date time variable), but it is failing to bear any fruit, can you please help me out.

Regards,
Rhitam Deb

What error you are facing?
Are you getting blank value or workflow it self showing error in code .

Hi @Rhitam_Deb,

use the below expressions

Datetime.ParseExact(“24/03/2019”,“dd/MM/yyyy”,system.Globalization.CultureInfo.InvariantCulture).AddMonths(1).ToString

datetime.AddMonths(1).ToString

The above datetime variable contains now

Refer the below workflow

Main (7).xaml (5.5 KB)

2 Likes