Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Currency and decimal convertor
#4
let's assume that you have Lithuanian format in control panel -> regional
Macro
Code:
Copy      Help
str s="12,34 Lt" ;;Lithuanian currency format. Also can be without Lt, start with Lt, etc, but fails if it is some other currency

CURRENCY cy
int hr=VarCyFromStr(@s LOCALE_USER_DEFAULT 0 &cy)
if(hr) end _s.dllerror("" "" hr)
out cy

;QM also uses VarCyFromStr, but this and other QM type conversion functions
;always use fixed locale 0x409 (English US), not LOCALE_USER_DEFAULT.

;Google for:
;site:microsoft.com Locale Constants


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)