using System; public class MainClass{ /// <summary> /// Gets the start of month. /// </summary> /// <param name="date">The date.</param> /// <returns></returns> public static DateTime GetStartOfMonth(DateTime date) { return new DateTime(new DateTime(date.Year, date.Month, 1).Ticks); } }