Results 1 to 4 of 4

Thread: BackSlash

  1. #1
    Larry Fisher Guest

    Default BackSlash

    I need to know how to deal with a date input on a form that contains a instead of / or -. I can do search for the or - but am having trouble correctly finding and replacing the so I can upload the date to a database. I ended up on this road because I have some employee birthdays that are getting converted to a 2000 date that should be in the 1900&#039s. Any help in cleanly searching and replacing a would be appreciated

  2. #2
    Join Date
    Dec 1969

    Default RE: BackSlash

    Try:<BR><BR>strDate = Replace(strDate, "\", "/")<BR><BR>(assuming you&#039re using VBScript)<BR><BR>HTH<BR><BR>Dunc

  3. #3
    Larry Fisher Guest

    Default Nevermind - I got it.

    Dang color coding was throwing me off. Homesite colors the code and the quote throws off the color coding scheme and that in turn threw me off. The answer to my problem was solved with the following.<BR><BR>&#060;%<BR>bday=Request.form("bi rthday")<BR>if len(bday)&#062;0 then<BR>thepos=left(right(bday, 3),1)<BR>bday=replace (bday, "\" , "-")<BR>response.write bday & "<BR>"<BR>response.write thepos & "<BR>"<BR>if thepos="/" or thepos="-" or thepos= "\" then<BR>birthday = month(bday) & "/" & day(bday) & "/19" & right(year(bday), 2)<BR>else<BR>birthday = month(bday) & "/" & day(bday) & "/" & year(bday)<BR>end if<BR>response.write birthday & "<BR>"<BR>end if<BR>%&#062;<BR>

  4. #4
    Larry Fisher Guest

    Default RE: BackSlash

    Thanks. That was actually what I was trying, but I was never even testing the code because the \" was throwing off the color coding in Homesite. I was overquoting to compensate and that was generating the error.<BR><BR>I am back on track now.

Posting Permissions

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