Thanks Allen

I had a look at those udfs earlier , but I could not get them to work.