Subject | Re: [firebird-support] How to retrieve milliseconds? |
---|---|
Author | Helen Borrie |
Post date | 2003-09-04T02:06:44Z |
At 05:07 PM 3/09/2003 +0000, you wrote:
doesn't. :-(
Declare the UDF GetExactTimeStamp() to your database. You'll find the
declaration inside the script fbudf.sql. Don't forget to commit it.
Now you can use GetExactTimestamp() instead of CURRENT_TIMESTAMP to get the
full timestamp:
CREATE TABLE TEST_MILLISECS(
ID INTEGER,
FTIMESTAMP TIMESTAMP);
COMMIT;
INSERT INTO TEST_MILLISECS
VALUES (1, GETEXACTTIMESTAMP());
COMMIT;
SELECT * FROM TEST MILLISECS;
ID FTIMESTAMP
======================
1 2003-09-04 12:05:24.6409
heLen
> - CURRENT_TIME and CURRENT_TIMESTAMP don't include milliseconds!!!It's supposed to but there is *some* C/C++ language-related reason why it
> - Why???
doesn't. :-(
> - It's very hard???But not impossible, as long as you are using Firebird, not IB.
Declare the UDF GetExactTimeStamp() to your database. You'll find the
declaration inside the script fbudf.sql. Don't forget to commit it.
Now you can use GetExactTimestamp() instead of CURRENT_TIMESTAMP to get the
full timestamp:
CREATE TABLE TEST_MILLISECS(
ID INTEGER,
FTIMESTAMP TIMESTAMP);
COMMIT;
INSERT INTO TEST_MILLISECS
VALUES (1, GETEXACTTIMESTAMP());
COMMIT;
SELECT * FROM TEST MILLISECS;
ID FTIMESTAMP
======================
1 2003-09-04 12:05:24.6409
heLen