Adding hours to dates fails in MFS (customization)
We have a customized Service Request report in MFS. That report needs to take into account the timezone offset.
So I'm using a query with something like:
to_char(l.labor_start_date+" + time_offset +"/24,'DD-MM-YYYY HH24:MI:SS')
where time_offset is a variable which is calculated seperately. The table "l" is csm_debrief_labor
This works perfectly when time_offset is a negative value, but fails miserably when time_offset is a positive value.
I changed the code into: to_char(l.labor_start_date+1/24,'DD-MM-YYYY HH24:MI:SS') but that doesn't work
to_char(l.labor_start_date-1/24,'DD-MM-YYYY HH24:MI:SS')