Código Delphi [-] procedure TForm1.Button1Click(Sender: TObject); var Month,Year,Day : Word; Fecha : TDateTime; K : Word; begin DecodeDate(Now,Year,Month,Day); Fecha := EncodeDate(Year,Month,3); K := DayOfWeek(Fecha); ShowMessage(IntToStr(k)); end;
procedure TForm1.Button1Click(Sender: TObject); var Month,Year,Day : Word; Fecha : TDateTime; K : Word; begin DecodeDate(Now,Year,Month,Day); Fecha := EncodeDate(Year,Month,3); K := DayOfWeek(Fecha); ShowMessage(IntToStr(k)); end;