Date Format (YYYY-MM-DD) Issue

i am finding date format issue i want the date in this format dd-mmm-yyyy but the system is showing date like below attachment and i want to update this date in print format. Rest system setting is OK.

image

Try doc.get_formatted(“fieldname”)

no effect this will code just generate date on yyyy-mm-dd format

Hi @Mohtashim_Shoaib,

Please try it.

{{ frappe.utils.get_datetime(doc.date_field_name).strftime("%d-%m-%Y") }}

Please set your date field in code in check it.

I hope this helps.

Thank You!

1 Like

NO THE SAME FORMAT HAD BEEN SHOWING

Hi @Mohtashim_Shoaib,

Please check it in the system settings.

Set your according.

It’s worked from my end in versions 14 and 15.

Thank You!

Ah, okay you want the months like Jan, Feb etc. (mmm)

So just use the code given by @NCP , just change the %m to %b as shown.

1 Like