|
|
|
|
Re: How to truncate the minutes and seconds from a date field [message #246134 is a reply to message #246068] |
Wed, 20 June 2007 01:28  |
 |
Littlefoot
Messages: 21825 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
DreamzZ wrote on Tue, 19 June 2007 21:46 | did you check Before posting
SQL> select sysdate from dual;
SYSDATE
---------
19-JUN-07
SQL> SELECT Trunc(SYSDATE,'HH') FROM dual;
TRUNC(SYS
---------
19-JUN-07
SQL>
|
LOL! That's a good one! If your default NLS_DATE_FORMAT settings are such that you don't see the difference, it doesn't mean that NOBODY sees the difference.SQL> alter session set nls_date_Format = 'dd.mm.yyyy hh24:mi:ss';
Session altered.
SQL> select sysdate from dual;
SYSDATE
-------------------
20.06.2007 08:27:01
SQL> select trunc(sysdate, 'hh') from dual;
TRUNC(SYSDATE,'HH')
-------------------
20.06.2007 08:00:00
SQL>
|
|
|