Conversion of value from database into monetary value with error

0

In the database ( SQL ) I have a field named Valor which is a decimal and contains the following value: 21581 that would be $ 215,81

However when doing casting of this value it is returning

$"{reader["valor"]:c}"
"R$ 21.581,00"
    
asked by anonymous 09.12.2016 / 17:19

1 answer

0

The conversion is correct.

In order for the converted value to be $ 215,81 , it should be written to the base as 215.81     

09.12.2016 / 17:46