If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > displying a portion of a string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-04, 11:45
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
displying a portion of a string

Is there a way I can display only a certain amount of characters from the begining of the string? For example, if the string is 1,000 characters long, how can I display only the first 100 characters?

No matter how many characters are in the original string I always want to display the first 100 characters.

I'm retrieving a recordset value using the following:

<%=(rsRecentEntries.Fields.Item("blogUserComment") .Value)%>

It displays the entire string and I am trying to figure out how I could use the left() or trim() functions to accomplish this. But, left() only has two parameters that removes a specific amount from the end of the string and trim only removes whitespace.

Any help is appreciated.
Thanks,
-Dman100-
Reply With Quote
  #2 (permalink)  
Old 09-16-04, 13:59
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
<%=Left(rsRecentEntries.Fields.Item("blogUserComme nt").Value, 100)%>
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #3 (permalink)  
Old 09-16-04, 14:16
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
Thanks a bunch!
-Dman100-
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On