Common Oracle date Function Conversion:
1. select extract (year from sysdate) "year", // obtain the year
Extract (month from sysdate) "moth", // obtain the month
Extract (day from sysdate) "day" // get the day
From dual
2. Select to_char (sysdate, 'mm') from dual; // month
Select to_char (sysdate, 'yyyy') from dual; // year
Select to_char (sysdate, 'dd') from dual; // day
3. to_date ('1970-12-21 ', 'yyyy-mm-dd'); // The mm is case insensitive.
4. to_date ('2017-12-21 ', 'day mm/dd/yyyy ')
5. Check the day of the week.
Select to_char (to_date ('1970-12-21 ', 'yyyy-mm-dd'), 'day') from dual;
6. select trunc (sysdate, 'dd') from dual; // remove the hour, minute, and second.
7. select sysdate from dual; // system time
This article is suitable for beginners who are just getting started to learn and have mastered the basic knowledge of Oracle databases, so that you can gain a deeper understanding of Oracle databases, I hope the content mentioned above will be helpful to you.