Saving time with . as separator

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
davor.TCS
Posts: 29
Joined: Thu 05 Apr 2012 22:10
Contact:

Saving time with . as separator

Post by davor.TCS » Fri 19 Sep 2014 08:04

I have time format on my device defined with . separator. Something like 11.09.14 (11 hours 9 minutes and 14 seconds) for time value. If I try to save that in SQLLite db file it saves me only hour, but seconds and minutes are 0?
Is there any solution for this?

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

Re: Saving time with . as separator

Post by AlexP » Fri 19 Sep 2014 12:24

Hello,

To change date/time format, you should set a corresponding format in the LiteConnection1.Options.DateFormat and LiteConnection1.Options.TimeFormat properties. In your case:

LiteConnection1.Options.TimeFormat := 'hh.mm.ss';

P.S. When displaying in visual components (DBGrid, etc.), date/time data will be displayed in a format defined by the OS.

davor.TCS
Posts: 29
Joined: Thu 05 Apr 2012 22:10
Contact:

Re: Saving time with . as separator

Post by davor.TCS » Sat 20 Sep 2014 10:25

Than you. That solved it.

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

Re: Saving time with . as separator

Post by AlexP » Mon 22 Sep 2014 05:59

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply