October 2002
Beginner
864 pages
18h 41m
English
If you want to add a touch of class to the way dates are displayed, you can use the TO_CHAR function to change the date picture. This example starts by obtaining today's date:
SQL> select sysdate 2 from dual; SYSDATE --------- 08-MAY-97
When converting a date to a character string, you use the TO_CHAR function with the following syntax: |
TO_CHAR(sysdate,'date picture')
date picture is how you want the date to look. Some of the most common parts of the date picture are as follows:
| Month | The current month spelled out |
| Mon | The current month abbreviated |
| Day | The current day of the week |
| mm | The number of the current month |
| yy | The last two numbers ... |
Read now
Unlock full access