+ Reply to Thread
Results 1 to 3 of 3

How to show decimal position to two and then show them as only digits?

  1. #1
    Registered User
    Join Date
    07-19-2007
    Posts
    31

    How to show decimal position to two and then show them as only digits?

    Sorry that my question is kind of strange but here is an example in Access SQL query:

    Number: 1234567.89 and I want to show it as 123456789. That is to select all digits, including two after decimal point and show them only as digits without decimal point.

    My current thinking:

    SELECT format(nz(myfile.[DOLLAR AMOUNT], "000000000"), "000000000")
    FROM myfile;

    but it only shows 001234568, not 123456789. Please help.

    Thanks,
    Ning

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: How to show decimal position to two and then show them as only digits?

    You could do this in a query. Add a new field and in the top row type NewFieldName: [Dollar Amount]*100Then in your query select this new field instead of the Dollar Amount Field to display.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-19-2007
    Posts
    31

    Re: How to show decimal position to two and then show them as only digits?

    Very smart and the simple solution resolved my issue. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1