Using postgres, I am trying to convert minutes to a string consisting of two characters.
For example, if the code outputs 0, I want to convert this to '00'.
EXTRACT(TIMEZONE_MINUTE FROM CURRENT_TIMESTAMP)
I've tried this so far but it adds a space in front. So instead of getting '00' I get ' 00'
to_char(EXTRACT(TIMEZONE_MINUTE FROM CURRENT_TIMESTAMP), '00')
Any help would be super appreciated!
Go straight to
to_char
withTZM
(time-zone minutes):