You should remove the Format options for these fields. If they have a
calculated value then there's no need for it.
The issue is that just a month's name is not sufficient to create a
complete Date object, which is what the built-in Format code is trying to
It also won't work if you manually enter "April" into that field. You'll
get the same error message.
There is one problem in your code: In the last line, the "date" needs to be with a capital "D", just like in the previous line.
Do you have a field format set for the month field? If so, that is not necessary because you are setting the contents programmatically, and therefore it's not necessary to have the field validate any user input. Remove any formatting form the field in question and make it read-only. That should fix your problem.
Thanks so much for all the help.... both answers are correct, but it would only let me tag one of them.
Once I removed the formatting from the field itself, and left the code, the day, month and year all dropped in.