How to get current and last day of every month?

Hi,

Another solution:
Hope the following helps you.

Last day previous month

New DateTime(Now.Year,Now.Month,1).AddDays(-1).ToString("dd/MM/yyyy")

1st dat previous month

New DateTime(Now.Year,Now.Month,1).AddMonths(-1).ToString("dd/MM/yyyy")

Regards,

5 Likes