To provide a more detailed answer and answer this question fooobar.com/questions/1233799 / ....
In Oracle, a โdateโ column is not a number or a string, but a โdatetimeโ value with a year, month, day, hour, minute, and second. The default time is midnight "00:00:00"
Request:
Select * From bdPedidos Where Data Like '%" + data + "%'"
will not work under any circumstances because the date column is not a string, using a "how" to force Oracle to convert from a date value to a string value. The string value can be year-month-day-time or month-day-year-year or day-month-year-time, it all depends on how a particular Oracle instance set the NLS_DATE_FORMAT parameter to display dates as strings.
The right way to cover every possible moment of the day:
Select * From bdPedidos Where Data between to_date('" + data + " 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('" + data + " 23:59:59','yyyy-mm-dd hh24:mi:ss')
source share