Converting and Calculating a Text Field
Content
We have an order total in our custom table, but its defined as text so that they can insert a dollar sign.
I am trying to sum dollar value of a customer, but can not since its not numeric.
My first thought was to do this (substr(Orders$Orders.OrderTotal,2)) That correctly gives me the order total without the $ symbol, but I still can not sum.
I then added to_number(substr(Orders$Orders.OrderTotal,2)) which now only gives me everything to the left of the decimal. If your order total is $99.99 the function returns 99. I believe the functions are working as designed, no bugs. I can also now take the sum of multiple orders, It doesn't include the cents.
Tagged:
1