procedure TFSetDate.Button1Click(Sender: TObject);
var
myDate : TDateTime;
begin
// Set my date variable using the EncodeDate function
myDate := EncodeDate(StrToInt(EdYear.text), StrToInt(EdMonth.text), StrToInt(EdDay.text));
DateTimePicker1.Date:=myDate;
end;
procedure TFSetDate.Button2Click(Sender: TObject);
var
myDate : TDateTime;
begin
// Set my date variable using the EncodeDate function
myDate := EncodeTime(StrToInt(EdHour.text), StrToInt(EdMinute.text), StrToInt(EdSecond.text),strtoint('000'));
DateTimePicker2.Time:=myDate;
end;
No comments:
Post a Comment