Start Of Quarter - CSharp System

CSharp examples for System:DateTime Quarter

Description

Start Of Quarter

Demo Code


using System;//from w  ww . j  ava 2 s.  co m

public class Main{
        public static DateTime StartOfQuarter(this DateTime date)
		{
			return new DateTime(date.Year, ((date.Month - 1) / 3) * 3 + 1, 1);
		}
}

Related Tutorials