Helped me too! Never too late.
thanks so much - this worked great and really helped me
Great, also see:
Formatting date as string from user input date value in ModelBuilder
Almost a decade after you posted, and your answer still works - even in ArcGIS Pro! The (possible?) difference from ArcMap is you access Calculate Value in Pro via its own item in the ModelBuilder ribbon under Utilities and set the data type as string.
I hope this helps other ArcGIS Pro folks who surf here as this thread was the top search engine result.
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!