Results 1 to 8 of 8

Thread: Help with Mid Function

Threaded View

  1. #6

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    23

    Re: Help with Mid Function

    Thanks for all the suggestions, I am really trying to get this to work using VBSCRIPT & ASP. Not sure I really should be posting in this forum.

    I currently have it so that I can get all the characters after the 47th position on....
    I would really like to get all the characters in between the last "\" and "." since the number of characters will be different each time.
    My problem is trying to incorporate your suggestions into this code.
    Code:
    <&#37;
      Do While Not rstSearch.EOF
    %>
    
    <tr>
      <td><%= rstSearch.Fields("type").Value %></td>
      <td><a href="<%= rstSearch.Fields("file_name").Value %>" target="_blank"><%= 
    
    mid(rstSearch.Fields("file_name").Value,47,len(rstSearch.Fields("file_name").Value)) %></a></td>
      </tr>
    <%
      rstSearch.MoveNext
      Loop
    %>
    Sample Data:

    Original file_name.value

    \\serverpath\directory\NonPublish\HelpDesk\now\CertificateExpiration.doc

    Modified file_name.value using above code

    CertificateExpiration.doc
    Last edited by Hack; Oct 7th, 2009 at 01:51 PM. Reason: Added Code Tags

Posting Permissions

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



Click Here to Expand Forum to Full Width