Cheque printing date format

In cheque printing how to print the date in each column,tried increase the font size

image

You can try the code below, insert into HTML section

{{frappe.utils.get_datetime(doc.posting_date).strftime('%d')[:1]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%d')[1:2]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%m')[:1]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%m')[1:2]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%Y')[:1]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%Y')[1:2]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%Y')[2:3]}}
{{frappe.utils.get_datetime(doc.posting_date).strftime('%Y')[3:4]}}

You must set the distance between them via CSS

3 Likes

Thanks its worked well.

for Formatting β€œDD-MM-YY”
{{
frappe.utils.get_datetime(doc.date).strftime(β€˜%d’)[:2]+β€˜-’+
frappe.utils.get_datetime(doc.date).strftime(β€˜%m’)[:2]+β€˜-’+
frappe.utils.get_datetime(doc.date).strftime(β€˜%Y’)[2:]
}}
@hendrik_zeta Thank you it’s work for me

1 Like