Answers for "linq query get last day of month"

C#
0

linq query get last day of month

DateTime now = DateTime.Now;
int DaysInMonth = DateTime.DaysInMonth(now.Year, now.Month); //gets last day of the month value
DateTime LastDayOfThisMonth = new DateTime(now.Year, now.Month, DaysInMonth); //created DateTimeobject for the last day

//reference LastDayOfThisMonth in your comparison
Posted by: Guest on March-08-2021

Code answers related to "linq query get last day of month"

C# Answers by Framework

Browse Popular Code Answers by Language