[Lazarus] Date format conversion function?

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Thu Dec 22 09:30:42 CET 2011



On Wed, 21 Dec 2011, Howard Lee Harkness wrote:

> I am using SQLite in a small application, and using TDateEdit to pick
> a date. The date is returned in the Text field (I can't find a
> DateTime property in this control) in the format 'mm/dd/yyyy', and to
> use INSERT in SQLite, it wants dates in the format 'yyyy-mm-dd'. Yes,
> I can write a reformatting function, but I would expect one to be
> already available somewhere.

See FormatDateTime in sysutils.

And TDateEdit has a Date property which is of type TDateTime.

Michael.




More information about the Lazarus mailing list