datetime decode error in sqlite table

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

datetime decode error in sqlite table

Post by sandy771 » Sun 26 Jul 2015 15:04

I am using unidac 6.1.3 on builder XE3

I have a sqlite database witha column defined as DATETIME the values written to this column are ISO8601 compliant and are eiter in the form
YYYY-MM-DD HH:MM:SS
or
YYYY-MM-DD HH:MM:SS.SSS

Reading these fields using UniQuery1->FieldByName("date")->AsString
gives either the correct date when no millisecs are present or 30/12/1899 when the date has millisecs

Is there a fix for this in a later version or a work around?

Thanks

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: datetime decode error in sqlite table

Post by MaximG » Mon 27 Jul 2015 09:50

We were unable to reproduce the problem over here. For the following investigation, please send us a small example that demonstrates the problem, including a test DB. You can send to maxing*devart*com

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Mon 27 Jul 2015 10:29

Thanks maxim

Example sent

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: datetime decode error in sqlite table

Post by MaximG » Mon 27 Jul 2015 10:39

Sorry, You can send to maximg*devart*com

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Mon 27 Jul 2015 12:48

Hi Maxim - have you received it?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: datetime decode error in sqlite table

Post by MaximG » Mon 27 Jul 2015 13:21

We received your test sample. We will investigate this behavior and inform you about the results.

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Mon 27 Jul 2015 13:25

Lovely - thank you

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Tue 28 Jul 2015 08:32

Morning

Any news on this - have you managed to reproduce it?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: datetime decode error in sqlite table

Post by MaximG » Tue 28 Jul 2015 08:52

We have reproduced the problem. It is due to the fact that the datestimes.date field in the provided database contains more than 3 symbols for the milliseconds value. You can ensure this by executing the query:
select cast(date as varchar(100)) from datestimes;
We have fixed processing of such values for milliseconds. The fix will be included in the next UniDAC build.

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Tue 28 Jul 2015 08:58

Thank You - any rough idea of when the next release will be out?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: datetime decode error in sqlite table

Post by MaximG » Tue 28 Jul 2015 13:23

We plan to release the new version of UniDAC within 1-2 months.

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: datetime decode error in sqlite table

Post by sandy771 » Tue 28 Jul 2015 13:30

Thank you

Post Reply