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
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
The text was updated successfully, but these errors were encountered: