How to enter in DateTime in Oracle
Some scope creep occured in the last couple of days and now I have to squeeze i开发者_如何学运维n date time. The Oracle stored procedure has a Date field (same with the table). Every time I try to enter in the date time value I get this refrain from the exception thrower:
ORA-01830: date format picture ends before converting entire input string
ORA-06512: at line 56
Here is what I try to enter:
SPECIALIST_APPT_DATETIMEIN := '09/Sep/1990 00:00:00'
Here is the param definition I try to squeeze it into:
PCP_APPOINTMENT_DATETIME`in `DATE`
It looks like you just need to use the TO_DATE
function to convert the string to a date.
SPECIALIST_APPT_DATETIMEIN := to_date('09/Sep/1990 00:00:00',
'DD/MON/YYYY HH24:MI:SS' );
assuming that you intend to enter times in the 24-hour format (i.e. 17:30:00 for 5:30pm).
精彩评论