0

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

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by autocrat
0

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 ?

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.