Finally fix problem with date differences.
It was a silly mistake on DateToDays, I had entered a variable name incorrectly. How did this take so long and so much work to be fixed?