Welcome

Welcome, thanks to look my blog

Friday 18 December 2015

Fungsi Encode Date dan Encode Time pada delphi Fungsinya seperti Date Serial di Access

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