1 Reply Latest reply on Apr 17, 2008 5:53 AM by bjg-Oracle

    date functions in sem_match()

    617912
      Hi,

      I need to execute a query which would retrieve items created in the last 2 days. The date format in the OWL is like this: 20080328T22:05:04.000+05:30.

      Can any one help me...

      Thanks,
      Rajesh.
        • 1. Re: date functions in sem_match()
          bjg-Oracle
          Hey Rajesh,

          You can use the SQL functions as part of the filter condition to achieve that. The SQL functions also work as part of the filter parameter of the SDO_RDF_MATCH procedure.

          'TRUNC ( 24 * (SYSDATE - TO_DATE( CONCAT ( SUBSTR (''20080327T22:10:04.000+05:30'', 1, 8), SUBSTR(''20080327T22:10:04.000+05:30'', 10, 8) ) , ''YYYYMMDDHH24:MI:SS'') ) ) <= 24'

          Thanks
          Bhaskar