Monetary Calculations
Author Message
Monetary Calculations
I am currently a FMP 4.1v3 / Win 98 User.

I currently have a field that is a monetary number, i.e. \$43.00
Is there a calculation that will re-write this in the following way:  Forty
three dollars and no/100.  Just like a check???

Thanks for any help

Kevin

Tue, 10 Sep 2002 03:00:00 GMT
Monetary Calculations

TROY WROTE:

Quote:
>I currently have a field that is a monetary number, i.e. \$43.00
>Is there a calculation that will re-write this in the following way:  Forty
>three dollars and no/100.  Just like a check???

Choose(Int(Mod(NumberField,10^12) / 10^11), "", "One Hundred ", "Two
Hundred ", "Three Hundred ", "Four Hundred ", "Five Hundred ", "Six
Hundred ", "Seven Hundred ", "Eight Hundred ", "Nine Hundred ")
&
If(Int(Mod(NumberField,10^11) / 10^10) = 1,
Choose(Int(Mod(NumberField,10^10) / 10^9), "Ten ", "Eleven ", "Twelve
",
"Thir{*filter*} ", "Four{*filter*} ", "Fif{*filter*} ", "Six{*filter*} ", "Seven{*filter*} ",
"Eigh{*filter*}
", "Nine{*filter*} "),
Choose(Int(Mod(NumberField,10^11) / 10^10), "", "", "Twenty ", "Thirty
",
"Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
&
Choose(Int(Mod(NumberField,10^10) / 10^9), "", "One ", "Two ", "Three
",
"Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine "))
&
Case(Int(Mod(NumberField,10^12)/10^9) and Int(Mod(NumberField,10^9) /
10^3), "Billion, ", Int(Mod(NumberField,10^12)/10^9),"Billion ","")
&
Choose(Int(Mod(NumberField,10^9) / 10^8), "", "One Hundred ", "Two
Hundred ", "Three Hundred ", "Four Hundred ", "Five Hundred ", "Six
Hundred ", "Seven Hundred ", "Eight Hundred ", "Nine Hundred ")
&
If(Int(Mod(NumberField,10^8) / 10^7) = 1,
Choose(Int(Mod(NumberField,10^7) / 10^6), "Ten ", "Eleven ", "Twelve
",
"Thir{*filter*} ", "Four{*filter*} ", "Fif{*filter*} ", "Six{*filter*} ", "Seven{*filter*} ",
"Eigh{*filter*}
", "Nine{*filter*} "),
Choose(Int(Mod(NumberField,10^8) / 10^7), "", "", "Twenty ", "Thirty
",
"Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
&
Choose(Int(Mod(NumberField,10^7) / 10^6), "", "One ", "Two ", "Three
",
"Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine "))
&
Case(Int(Mod(NumberField,10^9)/10^6) and Int(Mod(NumberField,10^6) /
10^3), "Million, ", Int(Mod(NumberField,10^9)/10^6),"Million ","")
&
Choose(Int(Mod(NumberField,10^6) / 10^5), "", "One Hundred ", "Two
Hundred ", "Three Hundred ", "Four Hundred ", "Five Hundred ", "Six
Hundred ", "Seven Hundred ", "Eight Hundred ", "Nine Hundred ")
&
If(Int(Mod(NumberField,10^5) / 10^4) = 1,
Choose(Int(Mod(NumberField,10^4) / 10^3), "Ten ", "Eleven ", "Twelve
",
"Thir{*filter*} ", "Four{*filter*} ", "Fif{*filter*} ", "Six{*filter*} ", "Seven{*filter*} ",
"Eigh{*filter*}
", "Nine{*filter*} "),
Choose(Int(Mod(NumberField,10^5) / 10^4), "", "", "Twenty ", "Thirty
",
"Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
&
Choose(Int(Mod(NumberField,10^4) / 10^3), "", "One ", "Two ", "Three
",
"Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine "))
&
Case(Int(Mod(NumberField,10^6)/10^3) and Int(Mod(NumberField,10^3) /
10^0), "Thousand, ", Int(Mod(NumberField,10^6)/10^3),"Thousand ","")
&
Choose(Int(Mod(NumberField,10^3) / 100), "", "One Hundred ", "Two
Hundred
", "Three Hundred ", "Four Hundred ", "Five Hundred ", "Six Hundred ",
"Seven Hundred ", "Eight Hundred ", "Nine Hundred ")
&
If(Int(Mod(NumberField,100) / 10) = 1,
Choose(Int(Mod(NumberField,10)), "Ten ", "Eleven ", "Twelve ",
"Thir{*filter*}
", "Four{*filter*} ", "Fif{*filter*} ", "Six{*filter*} ", "Seven{*filter*} ", "Eigh{*filter*} ",
"Nine{*filter*} "),
Choose(Int(Mod(NumberField,100) / 10), "", "", "Twenty ", "Thirty ",
"Forty ", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ") &
Choose(Int(Mod(NumberField,10)), "", "One ", "Two ", "Three ", "Four
",
"Five ", "Six ", "Seven ", "Eight ", "Nine ")) & Case(Int(NumberField)
1, "Dollars", Int(NumberField) = 1, "Dollar", "")
&
If(Mod(NumberField, 1) and Int(NumberField)," and ","")
&
If(Mod(Int(NumberField*10), 10) = 1,
Choose(Mod(Int(NumberField*100), 10), "Ten ", "Eleven ", "Twelve ",
"Thir{*filter*} ", "Four{*filter*} ", "Fif{*filter*} ", "Six{*filter*} ", "Seven{*filter*} ",
"Eigh{*filter*}
", "Nine{*filter*} "),
Choose(Mod(Int(NumberField*10), 10), "", "", "Twenty ", "Thirty ",
"Forty
", "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety ")
&
Choose(Mod(Int(NumberField*100), 10), "", "One ", "Two ", "Three ",
"Four
", "Five ", "Six ", "Seven ", "Eight ", "Nine ")) &
Case(Mod(NumberField, 1) > .01, "cents", Mod(NumberField, 1) = .01,
"cent","")

Wed, 11 Sep 2002 03:00:00 GMT

 Page 1 of 1 [ 2 post ]

Relevant Pages