Hi,
Just an update.
I was going to use the functionality in an udf environment, but "forgot" that it is not possible to issue SET commands in an udf.
So I had to look at Chris code again when it suddenly strooke me, that I should replace all the '-01-04' with '-04-01'.
Bingo.
John Valore