Преобразование даты в неделю
procedure TForm1.Button1Click(Sender: TObject); var frstDay,toDay : TDateTime; week : Integer; begin frstDay := StrToDate('1/1/96'); toDay := StrToDate(Edit1.Text); week := Trunc((toDay - frstDay) / 7) + 1; Label1.Caption := IntToStr(week); end; |
[001396]