procedure TFGetDate.DateTimePicker1Change(Sender: TObject); var myDate : TDateTime; myYear, myMonth, myDay : Word; begin myDate := DateTimePicker1.Date; //myDate := IncMonth(myDate); // And let us see what we get DecodeDate(myDate, myYear, myMonth, myDay); EdDateNow.Text:=DateToStr(myDate); EdDay.Text:=IntToStr(myDay); EdMonth.Text:=IntToStr(myMonth); EdYear.Text:=IntToStr(myYear); end;
procedure TFGetDate.DateTimePicker2Change(Sender: TObject); var myTime : TDateTime; myHour, myMinute, mySecond,myMsecond : Word; begin myTime := DateTimePicker2.Time; // And let us see what we get DecodeTime(myTime, myHour, myMinute, mySecond, myMSecond); EdTimeNow.Text:=TimeToStr(myTime); EdHour.Text:=IntToStr(myHour); EdMinute.Text:=IntToStr(myMinute); EdSecond.Text:=IntToStr(mySecond); end;
No comments:
Post a Comment