Grabbing the first character in a string.

Results 1 to 8 of 8

Thread: Grabbing the first character in a string.

  1. #1
    Ken Lewis Guest

    Default Grabbing the first character in a string.

    hiya! I am wanting to build up a string to reference an image by pulling the data out of my database.<BR><BR>I basically want first initial from the fname column, and last name from the lname column and then i&#039;ll add the .jpg thus i&#039;ll end up with a variable that would contain-<BR><BR>klewis.jpg<BR><BR>How should I go about getting the first initial out of the fname column?<BR><BR>Thanks in advance for the help.

  2. #2
    BAM Guest

    Default strInitial = left(fname,1)


  3. #3
    bmasters Guest

    Default Not Advanced.....


  4. #4
    Ken Lewis Guest

    Default RE: strInitial = left(fname,1)

    Thank you!

  5. #5
    Ken Lewis Guest

    Default RE: Not Advanced.....

    Thanks for nothing.

  6. #6
    Join Date
    Dec 1969

    Default You dont have to be rude buddy..

    ...this really wasnt advanced question at all, its just basic and u should be posting it in the ASP forum, moreover not a lot of people come here, so it would affect you, you might not get the answer in time, get it?

  7. #7
    Ken Lewis Guest

    Default all apologies...

    yes, sorry...but the posting guidlines said that questions should be from people who have a moderate amount of experince, but don&#039;t know the answer off the top of their head.<BR><BR>I guess it&#039;s a pretty standard question, sorry...but I din&#039;t know it and thought I was in the &#039;moderate&#039; catagory.<BR><BR>water under the bridge...

  8. #8
    Join Date
    Dec 1969

    Default in jScript you can use string.charAt(0)

    which would be substantially quicker and easier...<BR><BR>not that you&#039;rre using JScript, but I thought I&#039;d mention it in the ever-running crusade against VBScript

Posting Permissions

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