What I'm trying to achieve must be simple and I can only imagine that I am missing the obvious with this.
I am using Delphi 5 and want to display the time (hh:mm) in a standard TMaskEdit component.
I have set the 'EditMask' property to be '!90:00;1;_' (as set through the 'Short Time' selection available).
However when I display a Time in the component I seem to get the format 'hh:ss' with no minutes displayed.
I'm using the (simple) code that follows :
var
tpTime : TTime;
begin
tpTime := StrToTime('09:15:02');
maskedit1.Text := TimeToStr(tpTime);
end;
I would expect to see '09:15' in the MaskEdit but instead see '09:02'.
I'm obviously (maybe ??) missing the obvious with this one.
Any pointers would be appreciated.
Steve
I am using Delphi 5 and want to display the time (hh:mm) in a standard TMaskEdit component.
I have set the 'EditMask' property to be '!90:00;1;_' (as set through the 'Short Time' selection available).
However when I display a Time in the component I seem to get the format 'hh:ss' with no minutes displayed.
I'm using the (simple) code that follows :
var
tpTime : TTime;
begin
tpTime := StrToTime('09:15:02');
maskedit1.Text := TimeToStr(tpTime);
end;
I would expect to see '09:15' in the MaskEdit but instead see '09:02'.
I'm obviously (maybe ??) missing the obvious with this one.
Any pointers would be appreciated.
Steve