#1 2023-05-30 21:16:43

Enrique
Member
Registered: 2020-12-04

when converting to local timezone

Hello Team,


Since a while that i haven't posted here searchig for good advices is there any one here that had faced this error when working with conversion of date time stamp globally, for example I know that the database is not on my own timezone it is in Europe and I'm from Mexico, what i want to accomplish is only convert the data into my local timezone but when executing this SQL i got the the error described in the image.

What i need is only to have the date time conversion from Europe to Mexico time, having the 7 hours difference between one and the other.

"The report could not be executed : IllegalArgumentException: Could not map -101 to java class"

"An example of the value in the column is : "2023-05-24 16:25:50.531656"

Oracle sql:
SELECT
FECHA_Y_HORA_DE_MOVIMIENTO
FROM (SELECT
FROM_TZ(CAST(ii.DSTAMP AS TIMESTAMP), 'UTC') AT TIME ZONE 'America/Mexico_City'  as FECHA_Y_HORA_DE_MOVIMIENTO
FROM INVENTORY_TRANSACTION ii RIGHT OUTER JOIN ORDER_HEADER jj ON (ii.REFERENCE_ID = jj.ORDER_ID)
WHERE ii.SITE_ID LIKE '%MX%' 
AND ii.code = 'Shipment'
AND ii.DSTAMP between next_day(sysdate - 14, 'monday') and next_day(sysdate - 7, 'sunday'))



ERROR RS

Offline

#2 2023-05-31 08:56:40

eduardo
Administrator
Registered: 2016-11-01
Website

Re: when converting to local timezone

Hi Enrique,

1. Pls post a complete screenshot of Administration -> System console -> General Info (you can use http://imgbb.com for that)
2. Can you pls simplify (minimize) your query so that it only contains the necessary for reproducing the problem ? something like
Select CONVERT('2023-05-24 16:25:50.531656') as myDate where CONVERT is your function. So we can reproduce the problem.
3. what db exactly are you using for this datasource?

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB