Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get first day of month datetime c#

DateTime date = ...
var firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
var lastDayOfMonth = new DateTime(date.Year, date.Month, DateTime.DaysInMonth(date.Year, date.Month));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #day #month #datetime
ADD COMMENT
Topic
Name
7+2 =