
Quarter
Returns the quarter for the given date (1 for the first quarter).
Overloads
- Quarter()
- Quarter(Date,Integer)
- Quarter(Datetime,Integer)
Parameters
- Date - A Date value.
- Integer - An Integer value in the range of 1 to 12. It is an optional argument which indicates the beginning month of the first quarter. Specifying the number is useful for fiscal quarter. If b is not specified, the default is 1 which means January is the beginning month of the first quarter as same as the calendar quarter.
- Datetime - A DateStamp value.
Return value
Return an integer (1, 2, 3, 4).
Examples
- Quarter() - Return 3 if it is September according to the current system date.
- Quarter(ToDate(2006,11,28),4) - Return 3. In this example, the first quarter begins from the 4th month - April, so the 11th month is in the third quarter.
- Quarter(ToDateTime(2006,7,15,10,10,10),4) - Return 2.
