I have a timestamp column in my table and I need to pick up only those time values.
Example of how you are registered: 30.12.1899 17:03
Example of how I need to display via select: 17:00
I got it this way:
SELECT
CASE
WHEN Char_length(Extract(hour FROM coluna)) <= 1 THEN '0' || Extract( hour FROM coluna ) || ':00'
ELSE Extract(hour FROM coluna) || ':00'
end AS "DATA"
FROM tabela
Is there an easier way for me to achieve the same result?
OBS: I only need the time with two decimal places, the minutes will be fixed, that is, it will always be 00.