Subject | Re: Posting Question to IBPP Discussion? 2ne Attempt. |
---|---|
Author | pukindog_2004 |
Post date | 2004-12-10T19:12:20Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
I'm using dynamic SQL, and my INSERT statements looks like:
INSERT INTO nr_stroke_desc_table_01
(
time_stamp
)
values
(
'2004-12-03 09:39:04.546'
)
I can blow off retrieving milliseconds for now, but I do
need to be saving them. Does this construct do that?
Thanks
Larry
wrote:
> At 03:06 PM 9/12/2004 +0000, you wrote:apply the
>
>
> >Hi Folks:
> >
> >[off-topic material snipped]
> >
> > I"m using IBPP 2.3.1.1.
> >
> > How do I extract millisecond informatin from
> >a timestamp?
>
> The EXTRACT(SECOND FROM MyTimestamp) function returns the seconds as a
> DECIMAL(6,4). To compute the subsecond portion you would need to
> external (fbudf) function TRUNCATE, using an expression likeMyTimestamp) )
>
> EXTRACT(SECOND FROM MyTimestamp) - TRUNCATE( EXTRACT(SECOND FROM
>use the
> 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
> fbudf function GETEXACTTIMESTAMP(), which takes no arguments andreturns a
> fully-populated timestamp.Thanks Helen:
I'm using dynamic SQL, and my INSERT statements looks like:
INSERT INTO nr_stroke_desc_table_01
(
time_stamp
)
values
(
'2004-12-03 09:39:04.546'
)
I can blow off retrieving milliseconds for now, but I do
need to be saving them. Does this construct do that?
Thanks
Larry