Re: time/date granularity

2003-08-22 Thread Tanel Poder
Title: RE: time/date granularity



You can't even store sub second precision values in 
date datatype. Use timestamp instead (9i) or some custom format. In 8i you can 
have a java class which returns you date with high enough 
precision.
 
Tanel.
 

  - Original Message - 
  From: 
  Josh Collier 
  To: Multiple recipients of list ORACLE-L 
  
  Sent: Friday, August 22, 2003 8:44 
  PM
  Subject: RE: time/date granularity
  
  The 
  issue at hand is this:
   
  There is a column, setup_date that is populated by a trigger with 
  sysdate after insert. Now the developers want to know if there is a way they 
  can get the time of this date to a granularity of 10ths or 100ths of a second. 
  
   
  If I 
  insert sysdate, can I then extract the centisecond or decisecond of that 
  date/time?
   
  Make 
  sense?
   
  Thanks
   
  -Original Message-From: Jamadagni, Rajendra 
  [mailto:[EMAIL PROTECTED]Sent: Friday, August 22, 2003 
  10:30 AMTo: Multiple recipients of list ORACLE-LSubject: 
  RE: time/date granularity
  if you are pre 9i you can get up to 100th of a second using 
  dbms_utility.get_time(). 
  in post 9i, you can use systimestamp which will give you a 
  microsecond if you wish. 
  Raj  
  Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. 
  QOTD: Any clod can have facts, having an opinion is an art 
  ! 
  -Original Message- From: Josh 
  Collier [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, August 22, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: time/date granularity 
  Hi, 
  Is there a way for me to get the time of a particular sysdate 
  past the granularity of one second? 
  Thanks! 
  Josh -- Please 
  see the official ORACLE-L FAQ: http://www.orafaq.net -- 
  Author: Josh Collier   
  INET: [EMAIL PROTECTED] 
  Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
  San Diego, 
  California    -- Mailing list and web 
  hosting services - 
  To REMOVE yourself from this mailing list, send an E-Mail 
  message to: [EMAIL PROTECTED] (note EXACT spelling 
  of 'ListGuru') and in the message BODY, include a line 
  containing: UNSUB ORACLE-L (or the name of mailing 
  list you want to be removed from).  You may also 
  send the HELP command for other information (like subscribing). 



RE: time/date granularity

2003-08-22 Thread Jamadagni, Rajendra
Title: RE: time/date granularity



Josh,
 
sysdate has the granularity of a second only. You might want to add a new 
column for fractional seconds or change the column datatype to 
systimestamp;
 
if you create new column, you can just add the fractional part as follows 
...
 
create or replace trigger ...
after insert into my_table ...
where ...
begin
  :new.frac_seconds := 
to_char(systimestamp,'FFF');
end;
/
 
HTHS
Raj
 
Rajendra dot Jamadagni at nospamespn dot 
com All Views expressed in this email 
are strictly personal. QOTD: Any clod 
can have facts, having an opinion is an art ! 

  -Original Message-From: Josh Collier 
  [mailto:[EMAIL PROTECTED]Sent: Friday, August 22, 2003 
  1:44 PMTo: Multiple recipients of list ORACLE-LSubject: 
  RE: time/date granularity
  The 
  issue at hand is this:
   
  There is a column, setup_date that is populated by a trigger with 
  sysdate after insert. Now the developers want to know if there is a way they 
  can get the time of this date to a granularity of 10ths or 100ths of a second. 
  
   
  If I 
  insert sysdate, can I then extract the centisecond or decisecond of that 
  date/time?
   
  Make 
  sense?
   
  Thanks
   
  -Original Message-From: Jamadagni, Rajendra 
  [mailto:[EMAIL PROTECTED]Sent: Friday, August 22, 2003 
  10:30 AMTo: Multiple recipients of list ORACLE-LSubject: 
  RE: time/date granularity
  if you are pre 9i you can get up to 100th of a second using 
  dbms_utility.get_time(). 
  in post 9i, you can use systimestamp which will give you a 
  microsecond if you wish. 
  Raj  
  Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. 
  QOTD: Any clod can have facts, having an opinion is an art 
  ! 
  -Original Message- From: Josh 
  Collier [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, August 22, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: time/date granularity 
  Hi, 
  Is there a way for me to get the time of a particular sysdate 
  past the granularity of one second? 
  Thanks! 
  Josh -- Please 
  see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Josh Collier   INET: [EMAIL PROTECTED] 
  Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
  San Diego, 
  California    -- Mailing list and web 
  hosting services - 
  To REMOVE yourself from this mailing list, send an E-Mail 
  message to: [EMAIL PROTECTED] (note EXACT spelling 
  of 'ListGuru') and in the message BODY, include a line 
  containing: UNSUB ORACLE-L (or the name of mailing 
  list you want to be removed from).  You may also 
  send the HELP command for other information (like subscribing). 

This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*2


RE: time/date granularity

2003-08-22 Thread Josh Collier
Title: RE: time/date granularity



The 
issue at hand is this:
 
There 
is a column, setup_date that is populated by a trigger with sysdate after 
insert. Now the developers want to know if there is a way they can get the time 
of this date to a granularity of 10ths or 100ths of a second. 

 
If I 
insert sysdate, can I then extract the centisecond or decisecond of that 
date/time?
 
Make 
sense?
 
Thanks
 
-Original Message-From: Jamadagni, Rajendra 
[mailto:[EMAIL PROTECTED]Sent: Friday, August 22, 2003 
10:30 AMTo: Multiple recipients of list ORACLE-LSubject: 
RE: time/date granularity
if you are pre 9i you can get up to 100th of a second using 
dbms_utility.get_time(). 
in post 9i, you can use systimestamp which will give you a 
microsecond if you wish. 
Raj  
Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art ! 

-Original Message- From: Josh 
Collier [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 22, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: 
time/date granularity 
Hi, 
Is there a way for me to get the time of a particular sysdate 
past the granularity of one second? 
Thanks! 
Josh -- Please 
see the official ORACLE-L FAQ: http://www.orafaq.net -- 
Author: Josh Collier   
INET: [EMAIL PROTECTED] 
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
San Diego, California    
-- Mailing list and web hosting services - 
To REMOVE yourself from this mailing list, send an E-Mail 
message to: [EMAIL PROTECTED] (note EXACT spelling of 
'ListGuru') and in the message BODY, include a line 
containing: UNSUB ORACLE-L (or the name of mailing list 
you want to be removed from).  You may also send 
the HELP command for other information (like subscribing). 



RE: time/date granularity

2003-08-22 Thread Josh Collier
Sorry I left out the important thing:  9i rel 2.

Thanks.

-Original Message-
Sent: Friday, August 22, 2003 10:29 AM
To: Multiple recipients of list ORACLE-L


Josh - Which Oracle version? I think 9i has provision for this.

Dennis Williams
DBA, 80%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Friday, August 22, 2003 12:20 PM
To: Multiple recipients of list ORACLE-L


Hi,

Is there a way for me to get the time of a particular sysdate past the
granularity of one second?

Thanks!

Josh
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: time/date granularity

2003-08-22 Thread Jamadagni, Rajendra
Title: RE: time/date granularity





if you are pre 9i you can get up to 100th of a second using dbms_utility.get_time().


in post 9i, you can use systimestamp which will give you a microsecond if you wish.


Raj

Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !



-Original Message-
From: Josh Collier [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 22, 2003 1:20 PM
To: Multiple recipients of list ORACLE-L
Subject: time/date granularity



Hi,


Is there a way for me to get the time of a particular sysdate past the
granularity of one second?


Thanks!


Josh
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]


Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California    -- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



*This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*1


RE: time/date granularity

2003-08-22 Thread DENNIS WILLIAMS
Josh - Which Oracle version? I think 9i has provision for this.

Dennis Williams
DBA, 80%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Friday, August 22, 2003 12:20 PM
To: Multiple recipients of list ORACLE-L


Hi,

Is there a way for me to get the time of a particular sysdate past the
granularity of one second?

Thanks!

Josh
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).