Start Of Year - CSharp System

CSharp examples for System:DateTime Year

Description

Start Of Year

Demo Code


using System;//  w ww  .ja v  a 2s .c o  m

public class Main{
        public static DateTime StartOfYear(this DateTime date)
		{
			return new DateTime(date.Year, 1, 1);
		}
}

Related Tutorials