Skip Headers
Oracle® Database SQL Reference
10g Release 2 (10.2)

Part Number B14200-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

TO_NCHAR (datetime)

Syntax

to_nchar_date::=

Description of to_nchar_date.gif follows
Description of the illustration to_nchar_date.gif

Purpose

TO_NCHAR (datetime) converts a datetime or interval value of DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, INTERVAL MONTH TO YEAR, or INTERVAL DAY TO SECOND datatype from the database character set to the national character set.

Examples

The following example converts the order_date of all orders whose status is 9 to the national character set:

SELECT TO_NCHAR(order_date) FROM orders 
   WHERE order_status > 9; 

TO_NCHAR(ORDER_DATE) 
---------------------------- 
14-SEP-99 08.53.40.223345 AM 
13-SEP-99 09.19.00.654279 AM 
27-JUN-00 08.53.32.335522 PM 
26-JUN-00 09.19.43.190089 PM 
06-DEC-99 01.22.34.225609 PM