Results 1 to 6 of 6
  1. #1
    Timaxusa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    10

    Cryptocurrency format help

    Hi all. Looking for help on handling cryptocurrency format in access. Having a hard time converting properly and calculate all balances. Cryptocurrency has 8 decimal digit and I am importing from exchange as string and they all different lenght depending on value. How can I get all numbers show with 8 decimal digits correctly so I can perform calculation with them afterwards? now if I have one number 0.000001 and another 0.00000004 for examlbe I get infinite number. Thank you

  2. #2
    Timaxusa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    10
    I tried Format(MyValue,"#.########") and it gave me number with 8 decimals but 1.16911472 - 1.17839300 still gives me -9.27827999999997E-03. What am I missing here?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Why don't you use Format() on the expression?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Timaxusa is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    10
    Format did not help... I end up using Round(MyField, 8). Not sure if this was messing with exact calculations though

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I tested Format and it did work for me. I thought about Round.

    Round function uses even/odd (banker's rounding). Format does not.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Maybe this example will help you?
    The fields in the table - dblCrypto1 and dblCrypto2 - are Number types (doubles)
    and the fields in the table - txtCrypto1 and txtCrypto2 - are Text types.

    The calculations are done in the query.
    Attached Files Attached Files

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-30-2016, 10:27 AM
  2. Replies: 0
    Last Post: 11-19-2014, 05:47 AM
  3. Replies: 3
    Last Post: 09-07-2013, 04:59 PM
  4. Replies: 4
    Last Post: 03-12-2013, 06:49 PM
  5. Replies: 3
    Last Post: 03-05-2012, 04:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums