Erpnext: Formatting issue in function: frappe.utils.formatdate

Created on 9 Jul 2017  路  1Comment  路  Source: frappe/erpnext

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.

question

Most helpful comment

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")

>All comments

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")

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GSLabIt picture GSLabIt  路  4Comments

jboilesen picture jboilesen  路  3Comments

nabinhait picture nabinhait  路  4Comments

alimalkhalifa picture alimalkhalifa  路  3Comments

cradford picture cradford  路  4Comments