Convert String to Pls!!

Results 1 to 5 of 5

Thread: Convert String to Pls!!

  1. #1
    minni Guest

    Default Convert String to Pls!!

    I am reading a number of string values as follows...<BR><BR>FROM=MIA /TO=GCM /DEPDATE=01OCT /RETDATE=15OCT /RETTIME=9A /DEPTIME=9A /FARE=1059.20<BR><BR>I have used Instr function to capture the fare value <BR><BR>Now how can I convert the FARE value to Number so that I can do further calculations with it.<BR><BR>Thanks!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Convert String to Pls!!

    From<BR>(the VBCript reference link along the side)<BR><BR>CDbl([expression]) <BR><BR>Where Expression is your string value...<BR><BR>HTH

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Convert String to Pls!!

    Well you "CAN" use cdbl() or cint(). It all depends. If the numbers you get are going to ONLY be integers i would sugges you only use the cint function.

  4. #4
    Dan White Guest

    Default RE: Convert String to Pls!!

    You could try using the CCur function.<BR><BR>The CCur function converts any number to the variant of subtype Currency. <BR> <BR>Converts to currency values ranging from <BR>-922,337,203,685,477.5808 to 922,337,203,685,477.5807 <BR> <BR>Code: <BR>&#060;% anynumber=(12345) %&#062; <BR>&#060;% =CCur(anynumber) %&#062; <BR> <BR>Output: <BR>12345 <BR> <BR>This function rounds off to 4 decimal places. <BR> <BR>Code: <BR>&#060;% anynumber=(55555.123456) %&#062; <BR>&#060;% =CCur(anynumber) %&#062; <BR> <BR>Output: <BR>55555.1235 <BR><BR>Good luck!

  5. #5
    minni Guest

    Default thanks g-mny, Akilesh, Dan White! Thank you all! :

    thank you

Posting Permissions

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