none
removing decimal in numeric output RRS feed

  • Question

  • I have a query that is pulling a currency field from a database. I need the output to the table to be just 10 digits without the decimal point BUT I need the numbers to the right of the decimal. For example, if my amount is 850.75, I need my field in my table to be 0000085075. I've tried numerous ways and I either get 850.75 or 0000000850.

    The query replaces the table each time so preferably I'd like to format this in the query extraction.

    What am I missing?

    Tuesday, July 5, 2016 3:27 PM

Answers

  • Try

    NewField: Format([CurrencyField]*100, "0000000000")


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by csmchugh Tuesday, July 5, 2016 7:08 PM
    Tuesday, July 5, 2016 3:30 PM

All replies

  • Try

    NewField: Format([CurrencyField]*100, "0000000000")


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by csmchugh Tuesday, July 5, 2016 7:08 PM
    Tuesday, July 5, 2016 3:30 PM
  • I have a query that is pulling a currency field from a database. I need the output to the table to be just 10 digits without the decimal point BUT I need the numbers to the right of the decimal. For example, if my amount is 850.75, I need my field in my table to be 0000085075. I've tried numerous ways and I either get 850.75 or 0000000850.

    Hi csmchugh,

    You can make a function that first gets rid of the decimal point by multiplcation by 100. Then it formats the result with the padded zeros in front.

    Imb.

    Tuesday, July 5, 2016 3:32 PM
  • thank you!  works like a charm!

    Tuesday, July 5, 2016 7:08 PM