var
yy,mm,dd:word;date1:integer;
begin
  decodedate(now,yy,mm,dd);
  date1:=inttostr(dd);     //这就是日期了
 //其中now表示当前时间,decodedate是分解年月日的函数
end;