I have a TDateTimePicker component with the name - 'dttimeStart' and set its 
"Kind" property to dtkTime, and set the "Format" property to 'hh:MM' .

When user click at the Save button, the following code is executed. 


procedure TfrmMain.bbtnSaveClick(Sender: TObject);
begin
  With Table1 do
  Begin
    FieldByName('Field1').AsString := FormatDateTime('HH:mm',dttimeStart.Time); 
    Post;
  End;
end;

P/S: Field1's datatype is char(5), eg of data = 11.25
 

The problem now is when i browse from record to record, dttimeStart.time value 
doesn't change corresponding to Field1 value. It only change the hour's value, 
but not for the minutes's value:

For example: 

Record 1 -> Field1 : 11.25
Record 2 -> Field1 : 12.30

When i browse from Record 1 to Record 2, dttimeStart.time change from 11.25 to 
12.25, by right it should change from 11.25 to 12.30 instead of 12.25. The 
following is my code when the record is browsed, anything wrong with following 
code ?? 

procedure TfrmWorkShift.dbNavClick(Sender: TObject; Button: TNavigateBtn);
begin
  timeShiftIG.Time :=  FieldByName('GRACEIN').AsDateTime;
end;

Thanks in advance


                
---------------------------------
Yahoo! Sports
 Rekindle the Rivalries. Sign up for Fantasy Football

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to