How to match time alone (without date) in a query
Hi, I have a date colum named timeprop, where a time value has been inserted through:
DateFormat.getTimeInstance(DateFormat.MEDIUM, "de_DE").parse("11:12:13")
In SQL developer I can check the inserted value as:
select timeprop from version_table where timeprop is not null;
getting:
TIMEPROP
-------------------------
01.01.1900 11:12:13
so I guess Oracle added a default date as 1.01.1900. Ok.
But if I run:
select timeprop from version_table where timeprop = to_date('11:12:13', 'hh24:mi:ss');
then I get no result. I succeed only after adding that default date to the query - by patching the format as well - e.g.
select timeprop from version_table where timeprop = to_date('1.01.1900 11:12:13', 'dd.mm.yyyy hh24:mi:ss');
Basically, no time alone in a query.
Is this transformation always needed or am I missing anything from this game ?
Server is 11gr1.
Thanks.