Solved

date format

Posted on 2012-04-13
3
521 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 76

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 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37842399
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

792 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