Odd, the example doesn't seem to work for me. I'm running 10.3.1. If I run in a python script it works fine but not so much in Model Builder where the variable is assigned a "1". Any suggestions?
William, I was having the same issue but then I connected the output date (green bubble) as a precondition variable to the tools (yellow bubble) that I ran and it worked for me!
I seem to be having similar issues. I was getting the "1" output but now I get the date but also keep getting errors about incorrect naming. Can anyone tell me what name is wrong? The original demo tool provided further up has the same issue!