DateUtils单元是新添的日期和时间函数的集合。它包含了用于从TDateTime变量中提取值的新函数或从给
定时间间隔中计算值的函数,如:
//pick value
function DayOf(const AValue: TDateTime):Word;
function HourOf(const AValue: TDateTime):Word;
//value in range
function WeekOfYear(const AValue: TDateTime):integer;
function HourOfWeek(const AValue: TDateTime):integer;
function SecondOfHour(const AValue: TDateTime):integer;
显示操作系统版本信息(注意要用到SysUtils)
ShowMessage ('Running on Windows: ' +
IntToStr (Win32MajorVersion) + '.' +
IntToStr (Win32MinorVersion) + ' (Build ' +
IntToStr (Win32BuildNumber) + ') ' + #10#13 +
'Update: ' + Win32CSDVersion)