Bug 117395 - FIREBIRD: Timestamp-field shows only precision 0 without milliseconds
Summary: FIREBIRD: Timestamp-field shows only precision 0 without milliseconds
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-02 18:32 UTC by Robert Großkopf
Modified: 2018-05-03 06:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
firebird returns milliseconds (38.28 KB, image/png)
2018-05-02 19:09 UTC, Drew Jensen
Details
HSQLDB: Timestamp with milliseconds, input and view in GUI (3.87 KB, application/vnd.oasis.opendocument.database)
2018-05-03 05:57 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2018-05-02 18:32:30 UTC
With internal HSQLDB you could change the precision of a timestamp to 
ALTER TABLE "Table" ALTER COLUMN "Field" TIMESTAMP(6) and it will save milliseconds also.

With Firebird I couldn't get milliseconds, but the documentation for Firebird says it shouldn't be any problem.
If I start
select cast('NOW' as timestamp) from rdb$database
in Tools > SQL
it doesn't give milliseconds back, but the documentation of Firebird 2.5 shows milliseconds ...
Same behavior with
select cast('NOW' as time) from rdb$database

If I understand the documentation the right way the milliseconds should be shown per default.
select CURRENT_TIME(3) from rdb$database
doesn't show the milliseconds also. So it seems to be impossible to save time-values, which have to be more precision than seconds. For saving results of sports unusable.
Comment 1 Drew Jensen 2018-05-02 19:04:31 UTC
How did you write the data to the hsql Base table? 

Using two files, hsql and firebird, created here with 6.1 and identical 1 table, 2 fields w/datetime[timestamp] tables I find no difference between them in the GUI tools. There is no display of milliseconds in either.
Comment 2 Drew Jensen 2018-05-02 19:09:45 UTC
Created attachment 141844 [details]
firebird returns milliseconds

firebird does return milliseconds.

The screen shot is of the results in the SQL window from example select statement in the earlier comment.

It's the base display/input controls that are not displaying the values.
Comment 3 Robert Großkopf 2018-05-03 05:56:27 UTC
(In reply to Drew Jensen from comment #1)
> How did you write the data to the hsql Base table? 
> 
> Using two files, hsql and firebird, created here with 6.1 and identical 1
> table, 2 fields w/datetime[timestamp] tables I find no difference between
> them in the GUI tools. There is no display of milliseconds in either.

Have added a database with timestamp-field in HSQLDB. You have to set
ALTER TABLE "Table" ALTER COLUMN "Field" TIMESTAMP(6)
in Tolls > SQL before you could enter milliseconds.
Comment 4 Robert Großkopf 2018-05-03 05:57:20 UTC
Created attachment 141854 [details]
HSQLDB: Timestamp with milliseconds, input and view in GUI
Comment 5 Robert Großkopf 2018-05-03 06:01:53 UTC
(In reply to Drew Jensen from comment #2)
> Created attachment 141844 [details]
> firebird returns milliseconds
> 
> firebird does return milliseconds.
> 
> The screen shot is of the results in the SQL window from example select
> statement in the earlier comment.
> 
> It's the base display/input controls that are not displaying the values.

Have tested with
Version: 6.0.3.2
Build-ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
and didn't get the result you got.

And then:
Version: 6.1.0.0.alpha1
Build-ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group

the milliseconds will be shown.
I will close this one to WORKSFORME.