Get number of days in previous month

Hi, how can I get the number of days that there’s in the previous month?
Thank you

@Jad_Bennis
Welcome to the forum

can be done as following

grafik
DateTime.DaysInMonth(now.Year, now.AddMonths(-1).Month)

1 Like