Sorry Guys. False alarm on the Function.
I looked hard and long at it again just to make sure I have typed it all in correctly. I made a mistake. It should have been m5 at the end and not m1. That bit has now been rectified but I would still like to know how to re-format the date.