Re: how to set seconds-precision for systimestamp
From: Ken Quirici <kquirici_at_yahoo.com>
Date: Sun, 19 Apr 2009 16:50:51 -0700 (PDT)
Message-ID: <a1a9db32-b306-42cf-9eaf-de5811fec343_at_q9g2000yqc.googlegroups.com>
On Apr 19, 7:12 pm, Ed Prochak <edproc..._at_gmail.com> wrote:
> On Apr 19, 6:39 pm, Ken Quirici <kquir..._at_yahoo.com> wrote:
>
>
>
> > On Oracle 10g (10.2) installed on my home PC with vista premium:
>
> > I tried the following to have systimestamp return 9 digits of
> > precision - it returns
> > 9, but the last 6 are all always 0. How can I see those missing 6
> > digits of precision?
> > Thanks for any help.
>
> > ken
>
> > set serveroutput on size 1000000
>
> > declare
> > currtimestamp timestamp (9);
> > seconds number(9);
>
> > begin
> > currtimestamp := systimestamp;
> > dbms_output.put_line(to_char(currtimestamp,'ff9'));
>
> > end;
> > /
>
> what do you get from changing the output to this line:
> DBMS_OUTPUT.PUT_LINE( TO_CHAR(currtimestamp));
> ?
>
Date: Sun, 19 Apr 2009 16:50:51 -0700 (PDT)
Message-ID: <a1a9db32-b306-42cf-9eaf-de5811fec343_at_q9g2000yqc.googlegroups.com>
On Apr 19, 7:12 pm, Ed Prochak <edproc..._at_gmail.com> wrote:
> On Apr 19, 6:39 pm, Ken Quirici <kquir..._at_yahoo.com> wrote:
>
>
>
> > On Oracle 10g (10.2) installed on my home PC with vista premium:
>
> > I tried the following to have systimestamp return 9 digits of
> > precision - it returns
> > 9, but the last 6 are all always 0. How can I see those missing 6
> > digits of precision?
> > Thanks for any help.
>
> > ken
>
> > set serveroutput on size 1000000
>
> > declare
> > currtimestamp timestamp (9);
> > seconds number(9);
>
> > begin
> > currtimestamp := systimestamp;
> > dbms_output.put_line(to_char(currtimestamp,'ff9'));
>
> > end;
> > /
>
> what do you get from changing the output to this line:
> DBMS_OUTPUT.PUT_LINE( TO_CHAR(currtimestamp));
> ?
>
I just tried that - same deal - returns 9 digits of precision but last 6 (actually 7 but that's probably a coincidence) are zero.
> I suggest you check out the documentation. This page may help.http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dataty...
>
> Ed
Received on Sun Apr 19 2009 - 18:50:51 CDT