Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

DateTime previous day c#

public DateTime GetLastDayPrevMonth(int month, int year)
{
    return new DateTime(year, month, 1).AddDays(-1);
  // AddMonth(-1) for previous month
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #DateTime #previous #day
ADD COMMENT
Topic
Name
8+6 =