Raj More Raj More - 3 years ago 249
SQL Question

Oracle equivalent to SQL Server DATEPART

We need to get the HOUR out of a DATETIME column (expecting values from 0 to 23 to be returned).

Is there an Oracle equivalent of the SQL Server DATEPART function?

Answer Source
 SELECT to_number(to_char(sysdate, 'HH24')) FROM DUAL
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download