12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Setting up the Globalization Support Environment■ Month and day abbreviations used by the default date format (NLS_DATE_FORMAT)Example 11–6 shows how to use NLS_DATE_LANGUAGE to set the date language toFrench.Example 11–6 NLS_DATE_LANGUAGE=FRENCH, Month and Day Names-- set NLS_DATE_LANAGUAGE for this user sessionALTER SESSION SET NLS_DATE_LANGUAGE = FRENCH;-- display the current system dateSELECT TO_CHAR(SYSDATE, 'Day:Dd Month yyyy') FROM DUAL;You should see output similar to the following, depending on the current system date:TO_CHAR(SYSDATE,'DAY:DDMON--------------------------Jeudi :06 Octobre 2005The default date format uses the month abbreviations determined by NLS_DATE_LANGUAGE. For example, if the default date format is DD-MON-YYYY and NLS_DATE_LANGUAGE = FRENCH, then insert a date as follows:INSERT INTO table_name VALUES ('12-Févr.-1997');See Also: <strong>Oracle</strong> Database <strong>SQL</strong> Reference for information on dateformat models11.2.4.2 Time FormatsDifferent time formats are shown in Table 11–2.Table 11–2Examples of Time FormatsCountry Description ExampleEstonia hh24:mi:ss 13:50:23Germany hh24:mi:ss 13:50:23China hh24:mi:ss 13:50:23UK hh24:mi:ss 13:50:23US hh:mi:ssxff am 1:50:23.555 PMThis topic contains information about the following parameters:■■NLS_TIMESTAMP_FORMATNLS_TIMESTAMP_TZ_FORMAT11.2.4.2.1 NLS_TIMESTAMP_FORMAT NLS_TIMESTAMP_FORMAT defines the defaultdate format for the TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE datatypes. The NLS_TERRITORY parameter determines the default value of NLS_TIMESTAMP_FORMAT. The value of NLS_TIMESTAMP_FORMAT can be any validdatetime format mask.The following example shows a value for NLS_TIMESTAMP_FORMAT:NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH:MI:SS.FF'Working in a Global Environment 11-9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!