db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-163) Timestamps do not display trailing zeros
Date Fri, 28 Dec 2012 10:54:13 GMT

     [ https://issues.apache.org/jira/browse/DERBY-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-163:
-------------------------------------

      Component/s:     (was: SQL)
                   Documentation
    Fix Version/s: 10.2.2.0

Changing component to documentation.

The example that showed the wrong format was fixed in 10.2.2.0 as part of DERBY-1839. Marking
this issue as fixed in that version.
                
> Timestamps do not display trailing zeros
> ----------------------------------------
>
>                 Key: DERBY-163
>                 URL: https://issues.apache.org/jira/browse/DERBY-163
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.0.2.0
>         Environment: Windows XP Professional SP1
>            Reporter: George Baklarz
>            Priority: Minor
>              Labels: derby_triage10_5_2
>             Fix For: 10.2.2.0
>
>
> The timestamp format within Derby contains the following information:
>     yyyy-mm-dd-hh.mm.ss.mmmmmm
> When issuing a CURRENT TIMESTAMP function, it returns
>     yyyy-mm-dd-hh.mm.ss.mmm
> If you do a TIMESTAMP('1988-12-15-17.12.30.123400') it will return
>     1988-12-15-17.12.30.1234
> Is there any particular reason why Derby does not display the zeros at the end of the
field? This may just be just to be consistent with the ISO standards, but if you look at the
example in the manual, it shows:
>   VALUES TIMESTAMP(START_DATE, END_DATE)
>   1988-12-25-17.12.30.000000
> If I try this with a simple table:
> CREATE TABLE TS (A DATE, B TIME);
> INSERT INTO TS VALUES (CURRENT DATE, CURRENT TIME);
> SELECT TIMESTAMP(A,B) FROM TS;
> ij> select timestamp(a,b) from ts;
> 1
> --------------------------
> 2005-03-04 15:13:19.0
> So the 0's are not displayed, except for the first microsecond. The format needs to be
clarified either in the manuals or corrected in the program. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message