>I'm working on a cooking website and I'm storing the quantities as floats,
>but I'd like to display them as fractions for American cooks, while still
>retaining the ability to display as decimals if needed.

I don't have such a UDF, no. But I would strongly recommend storing the 
quantities as fixed-point numbers (decimal type in SQL) rather than 
floating-point if you plan on doing this. For your purposes, you're probably 
fine with 2-4 decimal places anyway, and it should make the conversion 
easier/more reliable. (Floating point imprecision is a right pain.)

Sixten

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249738
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to