I have a few numeric values in string format,
i need to convert the nos into integer so that i can use them for comparision

e.g
taken the month as 3, but in string it needs to be converted into integer for conversion,

how do i go about in VBscript


thanks

erm... possibly the wrong forum... maybe the Programming/Scripting forums would get more answers?


Still, in an effort to assist...
If you are dealing with "calendar values"... then you could look up VB finctions for calendar/date/day/month etc.
Alternatively, as you know the likely input, you could do a bunch of If/ElseIf checks, and manually pass though a list of possible string values, and then set them as numerical/integer values instead.

If it's jsut general text to number, you may encounter problems, as different people may input "text values" differently.

Alternatively, if you are simply taking inputs/values that are in "string" form, and want to handle them as "integers" (i.e. they user is inputting the number 3, but the input is set as text instead of integer), then there may be something like Cast or StrToInt for VB ?

Any chance of you informing others how this was solved if possible... that way others may benefit as well :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.