ORA-01861: literal does not match format string
I have a view created on Oracle DB 11g with the structure like this:
The column event_dtm is defined as: TO_DATE (b.general_2, 'dd-mm-yyyy hh24:mi:ss') event_dtm (the general_2 allows null)
The column created_dtm is defined as: a.charge_date created_dtm (charge_date is not null column)
I have 2 queries:
The 1st query:
SELECT COUNT(*)
FROM SELFCARE.HCPT_INTEC_USAGE_DETAILS_UAT
WHERE CREATED_DTM BETWEEN TO_DATE('01-10-2018','DD-MM-YYYY') AND TO_DATE('02-10-2018','DD-MM-YYYY');
Result:
The 2nd query:
SELECT COUNT(*)
FROM SELFCARE.HCPT_INTEC_USAGE_DETAILS_UAT