YearOf
Moduł: DateUtils
function YearOf(const AValue: TDateTime): Word;
Funkcja zwraca rok zapisany w dacie reprezentowanej przez typ TDateTime. Funkcja zwraca wartość z przedziału od 1 do 9999. Oto przykład:
program Foo;
{$APPTYPE CONSOLE}
uses
SysUtils, DateUtils;
begin
Writeln('Dzisiaj jest: ', DateTimeToStr(Now));
Writeln('-----');
Writeln('Rok: ', YearOf(Date));
Readln;
end.
Zobacz też: