Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 13th, 2003, 07:40 PM
Authorized User
 
Join Date: Jun 2003
Location: Jewett City, CT, USA.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to find substring

I am trying to take the separate parts of a decimal number. I have used the InStr method to determine if the decimal exists or not (ex. I could have just 5 instead of 5.2) Now I want to place the 5 in a FullNum variable and the 2 in the FracNum variable. I tried using the Mid function, but I keep getting a "Invalid procedure call or argument 'Mid'" error message. I always thought that VB used the Mid function as opposed to substr or something like that. Could someone please help me?

Chris Cote
  #2 (permalink)  
Old June 14th, 2003, 03:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Wien, Wien, Austria.
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

Try this:

Code:
arr_dec=Split(dec_number,".")
FullNum=arr_dec(0)
FracNum=arr_dec(1)
Regs,
NotNowJohn

...but the Soon is eclipsed by the Moon


Similar Threads
Thread Thread Starter Forum Replies Last Post
substring in c# sudhirbharti C# 1 February 21st, 2008 01:29 PM
Substring-before with Regex bonekrusher XSLT 6 November 27th, 2007 01:16 PM
Substring-after collation bonekrusher XSLT 2 May 11th, 2007 09:31 AM
SubString prasanta2expert Access VBA 1 November 17th, 2006 10:04 AM
Substring in Datagrid lily611 ADO.NET 5 July 22nd, 2004 02:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.