Solved

date format

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
grouping on time windows 6 51
join 2 views with 5 conditions 3 55
Include a logo in email body using Oracle utl_mail 11 30
Oracle - SQL Query with Function 3 36
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

777 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