sark9012 sark9012 - 1 year ago 79
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?


Answer Source

Divide it by 100?

1345 / 100 = 13.45
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download