Hi,
I was working on a scenario and build the following logic, I need to convert the time output from this case statement to INTERVAL HOUR TO MINUTE.
SELECT CURRENT_TIME(0), CASE WHEN EXTRACT(MINUTE FROM CURRENT_TIME(0)) - 30 >= 0 THEN CURRENT_TIME(0) + ((60 - EXTRACT(MINUTE FROM CURRENT_TIME(0))) * INTERVAL '1' MINUTE) ELSE CURRENT_TIME(0) - EXTRACT(MINUTE FROM CURRENT_TIME(0)) * INTERVAL '1' MINUTE END AS Converted_Time;
Thanks,
Forums: