Athento allows you to apply formatting to dates when evaluating dynamic expressions, for example, when extracting the value of a field to the time, generating a document from a template, etc.
To do this, you have to use the "strftime" method on some attribute of the Athento entities of type date. For example, to apply format to the creation date of a document, the following expression must be applied:
fil.creation_date.strftime(<format>)
If the dynamic expression for field extraction is specified, the result will be:
fil.creation_date.strftime('%B %d %Y')
This can be used in a word template to generate documents with "{{ fil.creation_date.strftime('%B %d %Y') }}".
Valid formatting codes can be found in the Python library documentation.
Comments
0 comments
Please sign in to leave a comment.