Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select Dates where time is less or equal to '12:00' Oracle

I require a query that selects rows where the time is less or equal to 12:00 I had something like this in mind:

SELECT daterow FROM datecolumn WHERE daterow <= TO_DATE('12:00, HH24:MI')

However i get an error:

ORA-01843: not a valid month

How would i go about to get all rows that have a time less than 12:00 mid-day?

like image 301
Nicholas Avatar asked Sep 06 '25 00:09

Nicholas


1 Answers

Try this,

SELECT daterow FROM datecolumn WHERE daterow <= TO_DATE('12:00', 'HH24:MI');
like image 127
Dba Avatar answered Sep 07 '25 21:09

Dba