I am currently using V22.214.171.124.45 of SQL Developer and appear to have come across a bug when using the Unit Test feature(s).
On creating a test implementation to pass a date time value to a PL/SQL package function (11g) there is no option to enter a time only a date.
I then proceeded to use the dynamic query untility and this masking the time to midnight (00:00:00) from a to_date() function as you can see in the following example:
--PACKAGE FUNCTION example
FUNCTION TESTFUNCTION (IN_TARGETREF IN number, IN_ONDATE IN DATE) RETURN VARCHAR2;
--example of a dynamic query used that will generate this error
select '1P' as RETURNS$, 1234 as IN_TARGETREF, to_date('27/10/2010 06:45','dd/mm/yyyy hh24:mi') as IN_ONDATE from sys.dual;
The output from running the debug is:
The following procedure was run.
:1 := "SCHEMA"."DB_PACKAGE"."TESTFUNCTION"(IN_TARGETREF=>:2,
Bind variables used
1 VARCHAR2 OUT (null)
2 NUMBER IN 1234
3 DATE IN 27\10\2010 00:00:00
<RETURN> : Expected: [1P], Received: [EXP]
Am I doing something wrong or can someone confirm this behaviour and it's not just my setup. Checking the DATE datatype in Oracle documentation and it does alow times.
Ian Lowson MIET
Edited by: user1044151 on 26-Oct-2010 22:54
You are correct that times are supported in the Oracle DATE datatype. I believe this bug is fixed in the current Early Adopter release version 3.1 which is downloadable from OTN.