Hi,
I am getting an error ORA-01847: day of month must be between 1 and last day of month while in Run Query activity of the database package.
This is how the query looks like inside the Run Query
“UPDATE ESIMAOBDSTATUS
SET UPLOAD_DATE = :uploadDate,UPLOAD_STATUS=:status
WHERE OBD = :obd”
I am passing the parameters uploadDate as DateTime and status as string. I am passing the value as date_getLocalDateTime and status as CurrentRow(“UPLOAD_STATUS”).tostring . This is the sample date format for date_getLocalDateTime 11/19/2025 12:40:05. If I remove UPLOAD_DATE column and update it is working perfectly.
Need your valuable feedback.
Regards,
Manjesh
1.Check Date Format Compatibility
UPDATE ESIMAOBDSTATUS
SET UPLOAD_DATE = TO_DATE(:uploadDate, ‘MM/DD/YYYY HH24:MI:SS’),
UPLOAD_STATUS = :status
WHERE OBD = :obd
2.Test the Query with Static Data
UPDATE ESIMAOBDSTATUS
SET UPLOAD_DATE = TO_DATE(‘11/19/2025 12:40:05’, ‘MM/DD/YYYY HH24:MI:SS’),
UPLOAD_STATUS = :status
WHERE OBD = :obd
If your parameter is still treated as a string → use TO_DATE
Replace your query like this:
UPDATE ESIMAOBDSTATUS
SET UPLOAD_DATE = TO_DATE(:uploadDate, ‘MM/DD/YYYY HH24:MI:SS’),
UPLOAD_STATUS = :status
WHERE OBD = :obd
And pass uploadDate as:
date_getLocalDateTime.ToString(“MM/dd/yyyy HH:mm:ss”)
Your date is being passed in the wrong format (string) → Oracle can’t convert it → ORA-01847.
Changing the parameter to proper Date type or using TO_DATE fixes it.