I need two or one (out) C# method that will take any datetime and return the start date of year and end date of year for that year.
void Dates(DateTime d, out DateTime b, out DateTime e)
{
b = new DateTime(d.Year, 1, 1);
e = new DateTime(d.Year, 12, 31);
}
DateTime startDate = new DateTime(year, 1, 1);
DateTime endDate = new DateTime(year, 12, 31);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With