Displaying only first 50 characters

Results 1 to 3 of 3

Thread: Displaying only first 50 characters

  1. #1
    Rob Guest

    Default Displaying only first 50 characters

    I want to display only the first 50 characters of a larger text field. <BR><BR>How do I trim off the first 50 characters when the string is greater than 50 characters? Thanks.<BR><BR>Dim ModifiedSynopsis<BR><BR>ModifiedSynopsis = objRS("synopsis")<BR>ModifiedSynopsis = len(ModifiedSynopsis)<BR><BR>ModifiedSynopsis = 250<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Displaying only first 50 characters

    left(string, 50)

  3. #3
    Join Date
    Dec 1969

    Default LEFT function...

    ModifiedSynopsis = Left( objRS("synopsis"), 50 )<BR><BR>If the field doesn&#039;t contain 50 characters, no problem. Only the ones it contains are retained.<BR><BR>This *will* chop in the middle of a word, you know. Want to prevent that? Or do you care?

Posting Permissions

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