Converting to Celsius fails

I have a line in my macro:
msgBox Cstr(Result.getFloat(1)) & "F is " & Cstr((Result.getFloat(1)-32)*9/5) & "C."
What it gives me is:

69.188F is 66.9384063720703C.

Now, I’m no good at doing those conversions in my head, but that didn’t look right to me, so I checked with a calculator. It’s supposed to be 20.66 Celcius. What gives? “Result” is the result of a mySQL query.

The result is correct, but your formula is wrong.
It should be (F-32)*5/9 instead.

1 Like

:flushed: That was a terrible attack of sloppiness on my part.