Issue Details (XML | Word | Printable)

Key: CORE-4457
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Mark Rotteveel
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

DATEADD should support fractional value for MILLISECOND

Created: 09/Jun/14 11:57 AM   Updated: 01/Jun/15 06:44 PM
Component/s: Engine
Affects Version/s: 2.5.2 Update 1
Fix Version/s: 3.0 Beta 1

QA Status: Done successfully


 Description  « Hide
Timestamps in Firebird have a 100 microsecond resolution, however the built-in DATEADD takes only integer values this makes it impossible to modify the 100 microsecond value of a TIMESTAMP.

For example:

SELECT CAST(DATEADD(-1 * EXTRACT(MILLISECOND FROM ts) MILLISECOND TO ts) AS VARCHAR(30)), EXTRACT(MILLISECOND FROM ts)
FROM (
    SELECT TIMESTAMP'2014-06-09 13:50:17.4971' as ts
    FROM RDB$DATABASE
) a

has output:
2014-06-09 13:50:17.0001 497.1

I would expect (or prefer) output:
2014-06-09 13:50:17.0000





 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes made changes - 09/Jun/14 12:18 PM
Field Original Value New Value
Assignee Adriano dos Santos Fernandes [ asfernandes ]
Adriano dos Santos Fernandes made changes - 10/Jun/14 07:53 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0 Beta 1 [ 10332 ]
Resolution Fixed [ 1 ]
Pavel Zotov made changes - 28/May/15 04:43 PM
Status Resolved [ 5 ] Resolved [ 5 ]
QA Status Done successfully
Pavel Zotov made changes - 01/Jun/15 06:44 PM
Status Resolved [ 5 ] Closed [ 6 ]