Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking string for characters 1

Status
Not open for further replies.

scottRen

Technical User
Feb 4, 2005
69
0
0
CA
i have a string containing a date, the format can be either containing a / or a - as a divider between the numbers

I would like to be able to determine if the string contains a / or a - so i can response.write something different for each case

thanks
 
here you go

str="4-0-05"
Code:
if instr(str,"/")=0 then 
response.Write "must be -"
else
response.Write "must be /"
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top