Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> converting a value to Oracle default date format

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: converting a value to Oracle default date format
 Burton  Posted: Mar 14, 2007 05:07:16 PM

 Total Post: 53
 Joined: Dec, 2006






 Hello Friends:
Have this question, not sure how to do it. Any experts out there?

If you have a date, Jan. 1, 1999, how can you convert it to the oracle default format?

I am trying it this way:
select to_date ('Jan 11 999', 'DD-MON-YYYY')
FROM DUAL;

But I am failing. Please advise !

Thanks.
B

 Burton
Posted: Mar 14, 2007 08:58:29 PM  

 Total Post: 53
 Joined: Dec, 2006






 
Select to_char (01/01/1999, 'MM/DD/YYYY')
from dual;

Is the way I am doing it now....

One other thing:
This is a question in a long list of questions. I have answered them all but I am having a problem just understanding the meaning of this:

In To_char(’02-JAN-03’,’DD/MM/YYY’) and to_date(‘02/02/2003’,’DD/MM/YYYY’), what the format masks, ‘DD/MM/YYYY’ does for these functions differently in terms of formatting input and/or output?

Any bright lights out there?
B

 Rush
Posted: Mar 15, 2007 01:11:02 AM  

 Total Post: 127
 Joined: Jan, 2007






 
Hello Burton
try this

select to_date('19,11,81','dd-mon-yy')from dual;

*plz don't give 'dd-mon-yy' dd-mm-yy will autometicaly convert this in default formate.and plz note 'dd-mm-yy' abd 'dd,mm,yy' both will work here
in this situation for default formate

RUPESH

 Rush
Posted: Mar 15, 2007 01:12:51 AM  

 Total Post: 127
 Joined: Jan, 2007






 
sorry burton,
solution is this
select to_date('19,11,81','dd-mm-yy')from dual;
avoid previous one

RUPESH

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software