Date2YearMonth Function
Returns the (Year * 100 + Month) number for a given date/time, 3 Mar 2000 would give 200003

Unit
QESBPCSDateTime

Declaration
Function Date2YearMonth(const DT: TDateTime): LongWord;

Returns
the Month where 1 = Jan, through 12 = Dec.

Category
Date/Time Conversion Routines
Month Based Arithmetic Routines

Implementation

function Date2YearMonth (const DT: TDateTime): LongWord;
var
     D, M, Y: Word;
begin
     OptDecodeDateW (DT, Y, M, D);
     Result := Y * 100 + M;
End;


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