Solved

date format

Posted on 2012-04-13
3
523 Views
Last Modified: 2012-04-13
It may sound a silly question but I am trying to achieve the following.


-- How to change the data format reported by the database? currenty the date is reported as MM/DD/YYYY with the timestamp by the database,

--I want to report it as YYYY/MM/DD and without the timestamp.

Any suggestions?
0
Comment
Question by:SANbuddies
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Ashok earned 500 total points
ID: 37842387
SELECT TO_CHAR(b, 'YYYY/MM/DD') AS myDate
FROM myTable;

HTH
Ashok
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37842392
Dates have no format, to give them one:

to_char(date_column,'YYYY/MM/DD')

or
set NLS_DATE_FORMAT.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37842399
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you sā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to recover a database from a user managed backup

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question