I’m not sure if this is a silly question, but what the simplest way to include the current date on your print format?
{{ frappe.utils.today() }}
Sorry this is not documented very well.
2 Likes
Oh, I didn’t find this one on the API documentation.
Thank you!
1 Like
2 more questions on that:
- How can I format the date to show dd.mm.yyyy
- How can I also include the current time in format of HH:mm?
- {{ frappe.utils.formatdate(frappe.utils.today(), ‘dd-MM-YYYY’) }}
- {{ frappe.utils.now_datetime().strftime(‘%H:%M’) }}
3 Likes