sark9012 sark9012 - 2 months ago 7
MySQL Question

Read out pence values into pounds and pence

I am attempting to read out a value from the database in pence.

For example, if I read out 1345 pence, this is £13.45.

What is the best way to ALWAYS put a dot after the first 2 decimal places?

Thanks.

Answer

Divide it by 100?

1345 / 100 = 13.45
Comments