----FROM DATE TO CHAR --------------------------------------------------------- select cust_no, to_char(date_reserved,'MM MONTH') month from bookings order by date_reserved; ---------------------------------------------------------- select cust_no, to_char(date_reserved,'MONTH DD, YYYY') month from bookings order by date_reserved; ----------------------------------------------------------- select cust_no, to_char(date_reserved,'MM/DD/YY') month from bookings order by date_reserved; --------------------------------------------------------------- select cust_no, to_char(date_reserved,'DAY, MON YEAR') month from bookings order by date_reserved; -------------------------------------------------------------- select cust_no, to_char(date_reserved,'"QTR" Q, YY') month from bookings order by date_reserved; -------------------------------------------------------------- select cust_no, to_char(date_reserved,'MONTH Dth, YYYY') month from bookings order by date_reserved; -------------------------------------------------------------- select cust_no, to_char(date_reserved,'MONTH D, YYYY') month from bookings order by date_reserved; ----------------------------------------------------------- ----TIME--------------------------------------------------- ----------------------------------------------------------- select to_char(sysdate,'HH:MI:SS') Time from dual; ----------------------------------------------------------- select to_date('09:00','HH24:MI') Time from dual; ------------------------------------------------------------- -----TO DATE ------------------------------------------------------------- select SYSDATE - TO_DATE('07-04-1976','MM-DD-YYYY') from dual; ----------------------------------------------------------- select to_date('09:00','HH24:MI')) from dual; ----------------------------------------------------------- --To Number From Date ------------------------------------------------------------ select cust_No, (to_number(to_char(sysdate,'J')) - to_number(to_char(Date_Reserved,'J'))) * 86400 + to_number(to_char(sysdate,'SSSSS')) time_in_hrs from bookings; -------------------------------------------------------- ----TO CHAR Formated ------------------------------------------------------ select registration, to_char(Cost,'$999,999.99') from Cars; --------------------------------------------------------- --NULL Value NVL ---------------------------------------------------------- select NVL(amount_due,0.0) from bookings order by amount_due;