WhichQuarter Function
Returns 1 if Date in Jan through Mar, 2 if Date in Apr through Jun, 3 if Date in Jul through Sep, 4 if Date in Oct through Dec.

Unit
QESBPCSDateTime

Declaration
Function WhichQuarter(const DT: TDateTime): Byte;

Parameters
DT Date/Time to process.

Category
Date/Time Arithmetic Routines

Implementation

function WhichQuarter (const DT: TDateTime): Byte;
begin
     Result := (Date2Month (DT) - 1) div 3 + 1;
End;


HTML generated by Time2HELP
http://www.time2help.com