-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
  • 960
  • 1
  • 11
  • 29

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,324
  • 2
  • 19
  • 32
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,173
  • 68
  • 59
  • 86
Muhammad Waheed
  • 960
  • 1
  • 11
  • 29