Find Quarter From DateTime

public static int Quarter(this DateTime dateTime)
{
return Convert.ToInt16((dateTime.Month - 1)/3) + 1;
}

This methods return the quarter when you pass the date.

Advertisements