If i going to change the month, i should change the Now.Add.Months(-1) for the last month right
and if i’m going to change the day for example; getting first day of last month or 2 previous month what should i change?
To get the first day of the last month, you can use Now.AddMonths(-1).AddDays(-Now.Day + 1). This subtracts one month from the current date and then subtracts the current day of the month and adds 1 to get the first day of the last month.
To get the first day of two months ago, use Now.AddMonths(-2).AddDays(-Now.Day + 1). This subtracts two months from the current date and then subtracts the current day of the month and adds 1 to get the first day of two months ago.