views:

12

answers:

1

I have a table in a Oracle database containing a date field EXPIRYDATE. I would need to select all records from the table, where the hour and minute portion of the date field are set to 0 (i.e. midnight). How can I achieve this?

I tried with the extract function (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions050.htm), but apparently it only accepts YEAR, MONTH or DAY as parameters for a date field.

+5  A: 

You could do this:

WHERE TO_CHAR(expirydate,'HH24MI') = '0000'
Tony Andrews