I have a simple stored procedure using DATE as an input:
CREATE OR REPLACE PROCEDURE delete_time(myTime DATE) IS
DELETE FROM mytable WHERE time = myTime;
This has been added to my EDMX using a function import, and the types mapped are Date on the SSDL side and DateTime on the CSDL.
The problem is when I run the procedure from .NET using a DateTime the hours and minutes are lost somewhere along the way:
DateTime dt = new DateTime(2013, 4, 3, 12, 15, 00);
var timeParam = new ObjectParameter("myTime", dt) :
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("DeleteTime", timeParam);
This runs the stored procedure but deletes the rows where TIME = 03-APR-2013 00:00:00 instead of 03-APR-2013 12:15:00
Is there some bug in the Oracle client (I'm using 184.108.40.206.20)? Or am I doing something wrong above?
I also tried using TIMESTAMP as the input type of my procedure, but then I get this error when calling the function:
ORA-01830: date format picture ends before converting entire input string