DateTime previous day c#

77

DateTime previous day c# -

public DateTime GetLastDayPrevMonth(int month, int year)
{
    return new DateTime(year, month, 1).AddDays(-1);
  // AddMonth(-1) for previous month
}

Comments

Submit
0 Comments