or clause in if then else

# Thread: or clause in if then else

1. Senior Member
Join Date
Dec 1969
Posts
150

## or clause in if then else

How do add OR in an if then else statement in asp<BR><BR>eg<BR><BR>If theDay = "01" OR "21" OR "31" Then<BR> suffix = "st"<BR>ElseIf theDay = "02" OR "22" Then<BR> suffix = "nd"<BR><BR>etc. y know what I mean

2. Senior Member
Join Date
Dec 1969
Posts
972

## RE: or clause in if then else

like this:<BR><BR>If theDay = "01" OR theDay = "21" OR theDay = "31" Then<BR> ...<BR><BR>etcetera<BR><BR>Or use this:<BR><BR>Select Case theDay<BR> Case "01", "21", "31"<BR> suffix = "st"<BR> Case "02", "22"<BR> suffic = "nd"<BR> Case Else<BR> suffix = "th"<BR>End Select

3. Senior Member
Join Date
Dec 1969
Posts
614

## AND/OR

If (theDay = "01") OR (theDay = "21") OR (theDay = "31") Then<BR> suffix = "st"<BR>ElseIf (theDay = "02") OR (theDay = "22") Then<BR> suffix = "nd"<BR><BR>

#### Posting Permissions

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