SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Guest

    Currency Format $999,999,999.99..............****** ***********

    Hi,

    I hope someone help me out.

    I have to get the exact format like $999,999,999.99, is there any built in function available for format currency.

    Thanks in advance,

    ------------------
    Satya

  2. #2
    pt
    pt is offline
    Member
    Join Date
    Feb 2001
    Location
    US
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Currency Format $999,999,999.99..............****** ***********

    u can check out the getformattedtext method

    let me know

    PT
    P.T.

  3. #3
    Guest

    Re: Currency Format $999,999,999.99..............****** ***********

    Thanks for reply,

    I used GetFormattedText but doesn't workout..is there any builtin function available in Silk?



    ------------------
    Satya

  4. #4
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Currency Format $999,999,999.99..............****** ***********

    I don't know of any built-in function.
    You may have to play around with these functions: (see Online Help for details)

    Stuff ()
    StrTran ()



  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Currency Format $999,999,999.99..............****** ***********

    Well, I'm not certain what you have to work with, but given there is a text field of some sort that presents you with retrievable text, you can "get" that string and compare it character by character against a known quantity. I use something like:

    [+] Boolean StringCompare (String Str1, String Str2)
    [ ] Boolean bGood = True
    [ ] String sTrim1
    [ ] String sTrim2
    [ ] Integer iLength
    [ ] Integer i
    [ ]
    [ ] sTrim1 = Trim(Str1) //Lose the white space.
    [ ] sTrim2 = Trim(Str2)
    [ ] iLength = Len(sTrim1) // Get the length of the first string.
    [-] if (iLength == Len(sTrim2)) // If the length/character count of each string is the same, check each character.
    [-] for (i = 1; i <= iLength; i++) // Walk the string.
    [-] if (sTrim1[i] != sTrim2[i]) // If character[i] is not the same in each string, we have a problem.
    [ ] _LogError("FAILURE! The characters don't match at character {i}")
    [ ] bGood = False
    [+] else
    [ ] _LogError("FAILURE! The string/line is a different length; String = {iLength}, List2 = {Len(sTrim2)}.")
    [ ] bGood = False
    [ ]
    [ ] return bGood
    [ ]

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Currency Format $999,999,999.99..............****** ***********

    If what your looking for is a way you can format values into the format $##,###.##, so that you can use that for comparing, here is a function for you


    ------------------
    David Genrich
    Blackhog
    932 Hamlin Court
    Sunnyvale, CA 94089
    dgenrich@blackhog.com

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:30 PM.

Copyright BetaSoft Inc.