We tried to implement dates on a sales invoice in which we wanted to have the German format dd. MMMM YYYY being e.g. 08. Juli 2017. We used the following in our PrintFormat
frappe.utils.formatdate(doc.get_formatted('posting_date'), "dd. MMMM YYYY")
The result is that it workes in many cases, but it seems, that when it is not 100% clear the engine gets confused. So if I use 29.06.2017 (06 being june) it will write 29. June 2017. If I use today date 08.07.2017 it will write 08. August 2017.
This lacks in function frappe.utils.formatdate.
frappe.utils.formatdate(doc.get_formatted('posting_date'), "dd. MMMM YYYY")
You are formatting this twice.
If you are using frappe.utils.formatdate, just try using
frappe.utils.formatdate(doc.posting_date, "dd. MMMM YYYY")
Most helpful comment
You are formatting this twice.
If you are using frappe.utils.formatdate, just try using
frappe.utils.formatdate(doc.posting_date, "dd. MMMM YYYY")