Currency Format and Sqlite

Folks, I’m very confused using the function format to deal with currency.

  1. when I use the “###,###.##” to format a textfield with, for example, 1234,33, the “.33” part (decimals) desapear

  2. when I use the “###,##0.00” to format a textfield with, for example, 1234,33, the “.33” part (decimals) became “,00”. This is odd because in the reference says that if it has number should present this number and ZERO only if it is not used;

  3. I’m storing in the Sqlite like 1234.33

What am I missing?

Thanks in advance.

Check this post

You’ll need to experiment a bit.

Thanks. In the Sqlite DB I’m using a REAL filed type to store the value. Do you recommend it? But I can’t assign the two decimal positions to it. Do you know what I mean? Is it normal?

Yup, sqlite uses basic “affinities” instead of the usual data types that you would find in other databases. Check this link
Your field definition is fine, data should be stored using dot as decimal, as it should anywhere you define a currency or double in your code - the CDBL and CSTR functions will (should) transform editfield etc inputs from your locale currency to the internal dot placeholder.

Hope that helps.