I have this code and it works great for some of the numbers but not ther other.

<%# Mid(DataSet1.FieldValue("ListNum", Container).Trim(), 5,1) %> with a number of 675432 the result would be 3. With a number of 75432 the result would be 2. I need them always be in the 2 spot even if my field has a 7, 6, 5, or 4 digit numbers in it.

This is trimming the ListNum field in my database down to one number. When the database field is 6 numbers long it works perfectly. If the database number is 5 numbers long it selects the last number instead of the 2nd to the last number. Is there a way to get the trim command to count the numbers from the right and not the left. So the code would look something like this.

<%# Mid(DataSet1.FieldValue("ListNum", Container).Trim(), 2,1) %>

Thanks for any help.