Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

Part Number E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
OLAXS486

TO_NCHAR (datetime)

TO_NCHAR(datetime) converts a datetime or interval value to the national character set.

Return Value

NVARCHAR2

Syntax

TO_NCHAR({ datetime | interval }
         [, fmt [, 'nlsparam' ] ]
        )

Arguments

datetime is a datetime expression to be converted to text.

interval is an interval expression to be converted to text.

fmt is a datetime model format specifying the format of char. The default date format is determined implicitly by the NLS_TERRITORY initialization parameter or can be set explicitly by the NLS_DATE_FORMAT parameter. For data type formats, refer to the Oracle Database SQL Language Reference.

nlsparam specifies the language in which month and day names and abbreviations are returned. This argument can have this form:

'NLS_DATE_LANGUAGE = language' 

By default, the return value is in the session date language.

Examples

TO_NCHAR(SYSDATE) returns a value such as 11-APR-08.

TO_NCHAR(SYSDATE, 'Day: MONTH DD, YYYY') returns a value such as Friday : APRIL 11, 2008.

TO_NCHAR(SYSDATE, 'Day: MONTH DD, YYYY', 'NLS_DATE_LANGUAGE = Spanish') returns a value such as Viernes : ABRIL 11, 2008.

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF