Formatting Dates

Sunday, January 31, 2010 ·

TO_CHAR Function

You can use the TO_CHAR function to customize the display of dates that are returned from a SQL SELECT statement.

The TO_CHAR function has two parameters. The first parameter is the date that you want to convert. The second parameter is the format model, which specifies the way that you want the date to look when displayed.

Many format models are available. A few are shown in the table below:

0 comments: