Extract the year from a given date.
Source position: dateutil.inc line 143
function YearOf( |
const AValue: TDateTime |
):Word; |
AValue |
|
Date to extract year from. |
Year part of AValue.
YearOf returns the year part of the AValue date/time indication. It is a number between 1 and 9999.
|
Extract the month from a given date. |
|
|
Extract the day (of month) part from a TDateTime value. |
|
|
Extract week (of the year) from a given date. |
|
|
Extract the hour part from a TDateTime value. |
|
|
Extract the minute part from a TDateTime value. |
|
|
Extract the second part from a TDateTime value. |
|
|
Extract the millisecond part from a TDateTime value. |
Program Example23; { This program demonstrates the YearOf function } Uses SysUtils,DateUtils; Var D : TDateTime; Begin D:=Now; Writeln('Year : ',YearOf(D)); Writeln('Month : ',MonthOf(D)); Writeln('Day : ',DayOf(D)); Writeln('Week : ',WeekOf(D)); Writeln('Hour : ',HourOf(D)); Writeln('Minute : ',MinuteOf(D)); Writeln('Second : ',SecondOf(D)); Writeln('MilliSecond : ',MilliSecondOf(D)); End.