Topic: Time format Issue
Howdy MVD!
I am trying to change my time from military to AM/PM. Any ideas why it is not working?
' strftime("%H:%M", A.ApptTime) As ApptTime, '
Thanks,
scribtx
My Visual Database → General → Time format Issue
Howdy MVD!
I am trying to change my time from military to AM/PM. Any ideas why it is not working?
' strftime("%H:%M", A.ApptTime) As ApptTime, '
Thanks,
scribtx
Hello.
You can change time format in a TableGrid using script
procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
TNxTimeColumn(Form1.TableGrid1.Columns[0]).FormatMask :='HH:mm am/pm';
end;
Drivesoft--
It is not in a table grid. It is in a text file.
Thanks,
scribtx
If it a text file, why you use SQL command strfime?
Please describe your case in more details.
Example, how to format time from database
procedure Form1_Button9_OnClick (Sender: TObject; var Cancel: boolean);
var
s: string;
time: TDateTime;
begin
s := SQLExecute('SELECT timefield FROM person WHERE id=1');
if s <> '' then
begin
time := SQLDateTimeToDateTime(s);
s := FormatDateTime('HH:mm am/pm', time);
ShowMessage(s);
end;
end;
My Visual Database → General → Time format Issue
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi