Closed guidupas closed 1 month ago
I attempted to reproduce this issue with the following interview. I did not get a "Bad date" problem.
mandatory: True
question: Your document
attachment:
docx template file: testdate.docx
---
question: |
Date
fields:
- Date: some_date
datatype: date
Here is the document: testdate.docx
I will need more information such as your interview YAML and the document you are trying to assemble.
Yes. It worked with your document. But I can´t se anything wrong with my template. What could return this 'Bad date' error?
The date formatting functions fall back to inserting "Bad date" if there is an error, such as if a date formatting function is called on a variable that is not a date object, or the variable is a string that cannot be parsed as a date, or if the babel.dates.format_datetime()
function cannot handle the given language. If the language is pt
, that is one of the languages that babel.dates.format_datetime()
supports, so it ought to work. See also https://docassemble.org/docs/config.html#babel%20dates%20map
Thank you very much. I will take a better look here
Closing this due to inactivity.
I have created an interview with a field defined as date datatype. When I download my document it has a 'Bad date' where the date should be.