If you have a DATE
that includes a time portion but are only interested in the actual date part, you can use the trunc
function:
select trunc(design_completion_date) as assessment_completion_date from nbi_dates
An example of the difference using sysdate
; notice the time on the trunc
'd version has been set to midnight:
SQL> alter session set nls_date_format = 'DD/MM/YYYY HH24:MI:SS';
Session altered.
SQL> select sysdate, trunc(sysdate) from dual;
SYSDATE TRUNC(SYSDATE)
------------------- -------------------
11/04/2013 15:14:31 11/04/2013 00:00:00
A DATE
has no inherent format. DD-MON-YYYY
is a format mask applied to display the date, or to convert it to a string representation, which is usually only necessary for display anyway. What you have as your third option is right for that purpose, but not if you want to do any further date calculations with the result.