-3

01-JAN-15 00:00:00 change to 01-JAN-2015 using SQL in SQL Developer

Current Output:

01-JAN-15 00:00:00

Expected Output:

01-JAN-2015 

Using SQL

Muhammad Waheed
  • 1,048
  • 1
  • 13
  • 30

2 Answers2

1

i think what you need is the view of sql developer - the way you want

You can do it from this path - in sql developer

Tools --> preferrence --> Database --> NLS

Check below screen shot

enter image description here

Ashish Shetkar
  • 1,414
  • 2
  • 18
  • 35
0

TRUNC (date):

The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is always of datatype DATE, even if you specify a different datetime datatype for date. If you omit fmt, then date is truncated to the nearest day.

You can use this as below:

select trunc(column_name) from table_name;
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Muhammad Waheed
  • 1,048
  • 1
  • 13
  • 30
  • That returns the same value as user9803698 already sees –  Jan 28 '19 at 08:03
  • I have tried on TOAD using Oracle 11g R2 and it's working. – Muhammad Waheed Jan 28 '19 at 08:09
  • I've added quote formatting to that block of text as it looks like you've copied it verbatim from an external source. To avoid plagiarism you must (at the very least) add attribution to the original source. – Wai Ha Lee Jan 28 '19 at 08:40