in Technology by

How to convert a date to char in Oracle? Give one example.

1 Answer

0 votes
by

The to_char() function is used to convert date to character. You can also specify the format in which you want output.

  1. SELECT to_char ( to_date ('12-12-2012''DD-MM-YYYY') , 'YYYY-MM-DD'FROM dual;  

Or,

  1. SELECT to_char ( to_date ('12-12-2012''DD-MM-YYYY') , 'DD-MM-YYYY'FROM dual;  

Related questions

0 votes
    How to convert a string to a date in Oracle database?...
asked Dec 18, 2020 in Technology by JackTerrance
0 votes
    How do you find current date and time in Oracle?...
asked Dec 18, 2020 in Technology by JackTerrance
0 votes
    What is the difference between multimolecular and macromolecular collids ? Give one example of each . How are ... colloids ? Select the correct answer from above options...
asked Jan 3, 2022 in Education by JackTerrance
0 votes
    What is meant by Ad-Hoc commands? Give one example....
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    The date stored in my database is 01-01-1900 for field emp_doj(Data Type DATE). But while retrieving ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    What are lyophilic and lyophobic sols?Give one example of each type ? Why is hydrophobic sol easily coagulated ? Select the correct answer from above options...
asked Jan 3, 2022 in Education by JackTerrance
0 votes
    Give one example each of ( a ) α − ( emission, ( b ) β c − − ( emission, and ( c ) K − ... Write an equation for these nuclear changes. Select the correct answer from above options...
asked Jan 2, 2022 in Education by JackTerrance
0 votes
    Give one example of Not Equals assignment operator.plz tell fast and correct Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    What are independent events? Give one example, Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    Give one example of an application which uses augmented reality. Select the correct answer from ... by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 12, 2021 in Education by JackTerrance
0 votes
    This question already has answers here: converting date format (5 answers) Closed 5 years ago. I have a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to convert a string into date format in Google Sheet. I've tried different formulas but ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I'm reading text from a flat file in c# and need to test whether certain values are dates. They ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm reading text from a flat file in c# and need to test whether certain values are dates. They ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm reading text from a flat file in c# and need to test whether certain values are dates. They ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
...