Hi all,
I am trying to create a general time range query for the management which will allow them to select the dates and see the invoices for that specific date range.
The query I generate using the query wizard is this:
SELECT T0."CreateDate" AS "Creation Date", T0."DocDate" AS "Posting Date", T0."DocNum" AS "Document Number", T0."CardCode" AS "Customer/Vendor Code", T0."CardName" AS "Customer/Vendor Name" FROM "DB-123-LIVE"."OINV" T0 WHERE T0."DocDate" > (TO_TIMESTAMP('[%0]', 'YYYYMMDD') ) AND T0."DocDate" < (TO_TIMESTAMP('[%1]', 'YYYYMMDD') )

I do get the date range selection range tab as shown above but when I try to put the date the error I receive is as following:
1). [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;303 invalid DATE, TIME or TIMESTAMP value: Error while parsing '2022-08-20 00:00:00.0000000' in format 'YYYYMMDD' as DATE/TIME at "to_timestamp" function 'Received Alerts' (OAIB) (at pos 245)
Is there something I am doing wrong? Would appreciate your suggestions.
Thank you advance.