Wednesday, March 7, 2012

Format String

Hi all
I am using a control that i hand a record set to.
One of the columns in the record set displays totals.
I need to format these totals into currency.
What is the best way of doing this?
I would like it to look like this £2,324.40
If possible.
Thanks Heaps
IanWhy not format it in the control? That way the control can apply the
user's preferred currency format settings, which might be harder to do
in the database. In general presentational stuff is best kept separate
from data retrieval. Otherwise, you'll want to take a look at the
various style options of the CONVERT function.
David Portas
SQL Server MVP
--|||Thanks David
I don't have control over the Grid control. Some one else developed it.
Ian
"David Portas" wrote:

> Why not format it in the control? That way the control can apply the
> user's preferred currency format settings, which might be harder to do
> in the database. In general presentational stuff is best kept separate
> from data retrieval. Otherwise, you'll want to take a look at the
> various style options of the CONVERT function.
> --
> David Portas
> SQL Server MVP
> --
>

No comments:

Post a Comment