The function is just a string manipulation function so as long as you call the function correctly and pass in the parameter it should work. You mentioned that the sample page I posted worked, correct? If so you should just take a look at how the code is set there for the function call. It may be that you are casting to the string (cStr) improperly or something like that. You should printing the value out directly to see how it looks before it is manipulated. Then try adding in the function to see if you get it switched around. If you continue to have problems with it you should try removing any cStr that you are using around the value, or try replacing the value in the code with a literal value to see if you get the same result.