Wrong output getting from query
All your numbers are integers, so the whole expression is done using integer division. You need to either provide numeric constant, e.g. using 3600.0 or cast at least one number to numeric
select 33/(17400/3600::numeric);

returns 6.8276, when applying to_char() it's correctly rounded to 7:
select to_char(33/(17400/3600::numeric),'FM99,999,999')

Online example