Reputation: 21
I am trying to create a OCCI::Date object using setDate method but I get an error while doing so.
Below is the snippet of my code.
using ODate = oracle::occi::Date;
ODate ts;
ts.setDate(datetime.year(),datetime.month(),datetime.day(),datetime.hour (),datetime.minute(),datetime.second());
this is the error I get - ORA-32146: Cannot perform operation on a null date
I also printed the values that I am passing to setDate method to check if those values are correct and they are all fine and within the Date range.
datetime.year() = 2018
datetime.month() = 6
datetime.day() = 5
datetime.hour() = 6
datetime.minute() = 1
datetime.seconds() = 22
Any leads to resolve this issue?
Upvotes: 1
Views: 489