Logo 
Search:

Oracle Articles

Submit Article
Home » Articles » Oracle » Select QueryRSS Feeds

Write a query to change the format of date using to_char function

Posted By: Rhys Evans     Category: Oracle     Views: 4378

Write a query to change the format of date using to_char function.

Write a query to  change the format of date : to_char function

SELECT to_char(SYSDATE,'dd-mm-yyyy') FROM dual;

Output : 

TO_CHAR(SY
26-04-1997

SELECT to_date('01-JUN-2002') FROM dual;

Output : 

TO_DATE('
01-JUN-02

SELECT substr('ssit',2) FROM dual;

Output : 

SUB
sit 
  
Share: 



Rhys Evans
Rhys Evans author of Write a query to change the format of date using to_char function is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!