Does it exist a way to find out the time (hour:minute:second) from a date type? I.e., I must compare the time between date columns, but the day/month/year are not parts in this comparison.
Well. I try to be clearer.
I have a value, say '18/03/2004 14:30:00'.
On my DB I have a table with 2 date columns, and the values on its rows are, say:
'01/01/1970 08:00:00' - '01/01/1970 12:30:00'
'01/01/1970 15:00:00' - '01/01/1970 18:00:00'
and so on...
I need to know if the time in my value, '14:30:00', is between the times in any row of my table. So, the first row goes from '8:00:00' and '12:30:00' and the second from '15:00:00' and '18:00:00'.
But I don't know how can I compare only the time of the date fields.