-
insert a specific time into my date column
i have table test with 2 columns
name,rdate
what is the select stmt if i want insert a specific time for date into my date column
insert into test(name,to_char(rdate,'dd-mon-YYYY HH:24:mi:ss AM')
values(kris,'09-aug-02 10:10:10 AM')
Is it correct , if do then it's giving error
Pls advise
Thank you for the time
-
try this...
insert into test values(to_date('09-aug-02 10:10:10 PM', 'dd-mon-yy hh:mi:ss PM'));
Why don't you use 10:10:10 PM instead of 22:10:10?
In that case it whld be easy and u can use HH24 while converting the time
Cheers!
OraKid.
-
thanks
I found other way
insert into test(name,rdate) values
('test1',to_timestamp('12-AUG-2003 10:13:11 PM','DD-MON-YYYY HH:MI:SS AM))
thanks for the help again
-
insert into test(name,to_char(rdate,'dd-mon-YYYY HH:24:mi:ss AM')
And what is wrong with this ?:
insert into test(name,rdate )
values('kris',to_date( '09-aug-2002 10:10:10 AM', 'dd-mon-YYYY HH:mi:ss AM')
Aleš Orehek
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
|