| nokia |
Posted: Jul 11, 2008 06:07:55 AM |
Total Post: 10
Joined: Jul, 2008
|
hi experts,.
some one suggest me that to_date fuction works in this way.
e.g
select to_date('10-jan-2008', 'mm/dd/yy') from dual;
the out put should be 01/10/08 this.
what it is not coming like that ..
i am confused just explain in better way
thanks in advance
davinder |
|
|
Raju |
| Posted: Jul 11, 2008 06:30:48 AM | |
|
Total Post: 1
Joined: Jul, 2008
|
The function to_date can use in following way--
select to_char( to_date('10-Jan-2008'),'mm/dd/yy')
from dual
Output of above query is--
01/10/08
|
|
|
|
|
nokia |
| Posted: Jul 12, 2008 09:18:10 AM | |
|
Total Post: 10
Joined: Jul, 2008
|
why it works with TO-CHAR fuction ?
why not it works alone?
|
|
|
|
|
Mohammed Taj |
| Posted: Jul 12, 2008 10:14:40 AM | |
|
Total Post: 746
Joined: Jul, 2007
|
becuase DD/MM/YY is not a date format you have to first convert liternal to date format then through to_char you can get desired output.
|
|
|
|
|
positive |
| Posted: Jul 13, 2008 01:06:28 AM | |
|
Total Post: 483
Joined: Jun, 2008
|
http://neworacledba.blogspot.com/
|
|
|
|
|
RAJNISH |
| Posted: Jul 18, 2008 08:24:32 AM | |
|
Total Post: 92
Joined: Jan, 2007
|
hi,,,
i have seen mentioned replied all roght.
in short i want to tell u that.
you can not use date format with To_Date function.
you can not use 'dd-mm-yyyy' with To_date you have to use to_char...
--Rajnish
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |