ORA-01821: Date Format Not Recognized SEM_MATCH And TO_TIMESTAMP (Doc ID 2023165.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial and Graph - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

Query using SEM_MATCH and TO_TIMESTAMP getting error:

  ORA-01821: date format not recognized

select activity, e, TO_TIMESTAMP(e,'YYYY-MM-DD"T"HH24:MI:SS.FF3TZH:TZM')
FROM TABLE(SEM_MATCH(
'{
  ?activity a hb:WriteMasterFile .
  ?activity prov:endedAtTime ?e .
  ?activity prov:startedAtTime ?s
}',
SEM_Models('provgen'),
NULL, -- SDO_RDF_Rulebases('rdfs++'),
SEM_ALIASES(SEM_ALIAS('prov', 'http://www.w3.org/ns/prov#'),
SEM_ALIAS('hb', 'http://data.thomsonreuters.com/ns/hudson-bay#')),
null));

  *
ERROR at line 1:
ORA-01821: date format not recognized

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms