Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATEADD should support fractional value for MILLISECOND [CORE4457] #4777

Closed
firebird-issue-importer opened this issue Jun 9, 2014 · 4 comments
Closed

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jun 9, 2014

Submitted by: @mrotteveel

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

Commits: 33a9510 FirebirdSQL/fbt-repository@06b88e0

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 9, 2014

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 10, 2014

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 28, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 1, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants