Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Location
    Washington DC area
    Posts
    1,770

    Unhappy Unanswered: Format conversion or string conversion

    I have a response for a form that come in a format of:
    DON(MC)01-67004-011
    This only thing I need from this is:
    MC01-67004-011

    Is there a conversion rule that will do this.

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    Not that I know of.

    You have to use string manipulation functions to achieve your goal.

    Right(string, length) is a function that returns a specified number of characters from the right side of a string. This would chop of the prefix.

    If DON(MC) is always the prefix, then the following function should take care of it.
    response = "MC" & right(mystring,12)

    If you don't know the prefix (or the final length of the string) then use the function, LEN. Len(string) is a function that returns the number of characters in a string.

    If complicated demands thwart these plans, you can also get search for a character within a string.
    (InStr([start, ]string1, string2[, compare])
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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