how to do: if string contains am then

Results 1 to 3 of 3

Thread: how to do: if string contains am then

  1. #1
    Join Date
    Dec 1969
    Posts
    672

    Default how to do: if string contains am then

    I am trying to make data input easier.i want to know how to make it so if a string looks like this: 1.22amit will leave it alone, but if it is like 1.22 or 1.22pm it changes it to 1.22pmthis does not work:if TimeOUT = "%am" thenelseTimeOUT=replace(TimeOUT, "pm", "")TimeOUT=TimeOUT&"PM"end ifit doesn&#039t just look for the "am"thanks!
    ________
    HOST AND DESIGN
    Last edited by Jay; 04-16-2011 at 01:03 AM.

  2. #2
    Nathan Pond Guest

    Default RE: how to do: if string contains am then

    Use InStr()<BR><BR>If InStr(TimeOUT, "am") = 0 Then<BR> TimeOUT = Replace(TimeOUT, "pm", "")<BR> TimeOUT = TimeOUT & "pm"<BR>End If<BR><BR>hope this helps<BR><BR>Nathan Pond<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    672

    Default RE: how to do: if string contains am then

    Thank you, you are a great.
    ________
    perfect tits Webcam
    Last edited by Jay; 04-16-2011 at 01:30 AM.

Posting Permissions

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