Subject | Re: [firebird-support] Posting Question to IBPP Discussion? 2ne Attempt. |
---|---|
Author | Helen Borrie |
Post date | 2004-12-09T22:34:28Z |
At 03:06 PM 9/12/2004 +0000, you wrote:
DECIMAL(6,4). To compute the subsecond portion you would need to apply the
external (fbudf) function TRUNCATE, using an expression like
EXTRACT(SECOND FROM MyTimestamp) - TRUNCATE( EXTRACT(SECOND FROM MyTimestamp) )
But there's a gotcha here. If you stored MyTimeStamp by capturing the
system date/time (CURRENT_TIMESTAMP or CURRENT_TIME) then the subsecond
portion is always zero. To store an exact timestamp, you need to use the
fbudf function GETEXACTTIMESTAMP(), which takes no arguments and returns a
fully-populated timestamp.
./heLen
>Hi Folks:The EXTRACT(SECOND FROM MyTimestamp) function returns the seconds as a
>
>[off-topic material snipped]
>
> I"m using IBPP 2.3.1.1.
>
> How do I extract millisecond informatin from
>a timestamp?
DECIMAL(6,4). To compute the subsecond portion you would need to apply the
external (fbudf) function TRUNCATE, using an expression like
EXTRACT(SECOND FROM MyTimestamp) - TRUNCATE( EXTRACT(SECOND FROM MyTimestamp) )
But there's a gotcha here. If you stored MyTimeStamp by capturing the
system date/time (CURRENT_TIMESTAMP or CURRENT_TIME) then the subsecond
portion is always zero. To store an exact timestamp, you need to use the
fbudf function GETEXACTTIMESTAMP(), which takes no arguments and returns a
fully-populated timestamp.
./heLen