I am getting a value from a datatable in the format:
What I want to do is get his last initial, in this case, "J"
Any ideas on how best to do this?
For the initial of the last name:
Just use substr(); to get the first character.
If you wanted to get the initial of the first name:
Use match(); to get a char position on the comma. If the first initial position is always comma+2, then use substr(); to grab the initial. [ 01-23-2004, 03:17 PM: Message edited by: jpensyl ]
Get the value, then after you get the value... just grab the first character.
value = substr( value, 1, 1 );
value will then be the first character.
Use split function based on "," and take into an array.
Use the first or last prt of the name as per you requirement from the array.