HELP! UDF for string manipulation in INTERBASE

I am in need for a string mainipulating routine for INTERBASE.
I would like to use it for converting string to date, like when my
text file has a date in string format 960221, I have to put in the
separator ie 96/02/21, and optioanlly rotate the Y,M,D.

Anyone ?

Vidar