Convert Text to Number

Convert Text to Number

Ok, what I need to do is this:

I am grabbing XML data into text fields.  Most data is text, but some is actually numbers.  I need to be able to take two fields, which are text, but are "decimal text".  By this I mean the data is stored in a text field, but its stored in decimal format.

For example - in my field called "text1" the value is 907.52
                   - in my field called "text2" the value is 925.72

I need to convert those text fields into integer fields, and remove everything to the right of the decimal point, thus creating whole numbers, 908 (rounded), and 926 (rounded), respectively.

I then need a formula field to calculate text2 - text1 (this part I have figured out)

So, to summarize:

I need to convert 2 text fields into numbers field, and then remove the decimals by rounding up, so I then can subtract values of the two fields.  I was able to convert text (that wasnt a decimal) to a number using .toLong(), but thats not working with the decimals...

Help me please, I'm ready to lose my mind.  

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner









                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方