SQLite, Date and Time

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
isysoftware
Posts: 44
Joined: Wed 14 Nov 2012 17:33

SQLite, Date and Time

Post by isysoftware » Tue 08 Apr 2014 16:21

Hi All,
In a Sqlite DB I need to save a date and a time:
Example:
In_date: 08/04/2014
In_Time: 15:00
Out_Time: 18:00

My questions:
What kind of db type I need for Date and/or Time field?
Can I retrive Date and/or Time with aQ.fieldbyname('mydate').asDatetime? I need conversions?

Thanks,
Flavio

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLite, Date and Time

Post by AlexP » Wed 09 Apr 2014 09:00

Hello,

To work with date and time in SQLite, you can use the DATETIME type, and you will be able to work with the fields in Delphi using the AsDAteTime property with no need to convert them.

Post Reply