-
I want to insert mili second in date column. How can I achieve this ???
Eg. 01-05-2001 12:30:35:800 so here 800 are Milliseconds?
Or Oracle will insert milisecond auto when u insert date. If that is so how can I get milisecond part along with date and time.
Thanks
-
SQL> select sysdate from dual;
SYSDATE
---------
05-JAN-01
SQL> select to_char(sysdate,'mmddyyyyhh24miss') from dual;
TO_CHAR(SYSDATE,'MMDDYYYYHH24MISS')
----------------------------------------------------------
01052001102049
I mean. you can use 'to_char' to get full date format.
[Edited by sreddy on 01-05-2001 at 11:36 AM]
-
I don't think oracle stores milliseconds in its DATE
datatype.
A DATE datatype only stores
centuryyear,month,day,hour,minute,second.
-
AFAIK, he is correct. Oracle does not store milliseconds.
The format that sreddy provided is
mm - month
dd - day
yyyy - year
hh24 - hour (24)
mi - minutes
ss - seconds
- Chris
-
Yup, you will have to wait until 9i until you can access parts of a second.
Jeff Hunter
-
Yes ! DB2 supports and I don't think Oracle supports it as of now.
-
you can using java in oracle
you can create a simple script using Java in Oracle that will get you milliseconds.
I read it in ORACLE magazine.
I could post it here if ya want, but it is definately online probably. It was a pretty cool program.
Lemme see if I can find it online somewhere.
- Magnus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|