In other words convert from dd.mm.yyyy to dd/mm/yyyy which is why I initially said that the OP could also try a different method which would not require any coding.
It could be tried and, if it did what was required, then all well and good. If it failed there is still the function to use.