Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Oracle date display

Don Burleson

 

You can create separate columns for date and time like this:

1 - Change nls_date_format

ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY MM DD';
select sysdate from dual;

ALTER SESSION SET NLS_DATE_FORMAT = 'HH24:MI:SS';
select sysdate from dual;


or

2 - use the format mask

select to_char(sysdate,'HH24:MI:SS') from dual;
select to_char(sysdate,'YYY MM DD') from dual;


This link shows a good summary of the date. time formats for sysdate and nls_date_format:

Element

Description

Date Format

SCC or CC

Centry; S prefixes BC date with -

YYYY or SYYYY

Year; S prefixes BC date with -

YYY or YY or Y

Last 3, 2, or 1 digits of year

Y,YYY

Year with comma in this position

IYYY, IYY, IY, I

4, 3, 2, or 1 digit year based on the ISO standard

SYEAR or YEAR

Year spelled out; S prefixes BC date with -

BC or AD

BC/AD indicator

B.C. or A.D.

BC/AC indicator with periods

Q

Quarter of year

MM

Month, two-digit value

MONTH

Name of month padded iwth blanks to length of 9 characters

MON

Name of month, three-leter abbreviation

RM

Roman numeral month

WW or W

Week of year or month

DDD or DD or D

Day of year, month or week

DAY

Name of day padded iwth blanks to length of 9 characters

DY

Name of day; 3 letter abbreviation

J

Julian day; the number of days since 31 December 4713 BC

Time Format

AM or PM

Meridian indicator

A.M. or P.M.

Meridian indicator with periods

HH or HH12 or HH24

Hour of day or hour(1-12) or hour(0-23)

MI

Minute (0-59)

SS

Second (0-59)

SSSSS

Seconds past midnight (0-86399)

Date Display Suffixes

TH

Ordinal number (i.e. DDTH for 5TH)

SP

Spelled-out number (i.e. DDSP for FIVE)

SPTH or THSP

Spelled-out ordinal numbers (i.e. DDSPTH for FIFTH)

Other Date Formatting

/ , .

Punctuation is reproduced in the result

"of the"

Quoted string is reproduced in the result

 


Here are instructions for displaying elapsed times:

http://www.dba-oracle.com/tips_oracle_sysdate_example.htm


 


 

 

��  
 
 

 
 
 
 
oracle dba poster
 

 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright 1996 -  2014

All rights reserved by Burleson

Oracle is the registered trademark of Oracle Corporation.