I have a new question for that.
Sorry, i made a mistake, i mean how i can change the date format in 1 field.
you can change that from backend,
In py script,
date = datetime.strptime(fieldname, ‘%Y-%m-%d’).strftime(‘%d-%m-%y’)
1 Like
Via custom script
frappe.ui.form.on('Your DocType', 'onload_post_render', function(frm){
const my_date_format = "dd/mm/yy"
frm.fields_dict.your_date_field.date_format = my_date_format;
frm.fields_dict.your_date_field.datePicker_options.dateFormat = my_date_format;
frm.fields_dict.your_date_field.set_datepicker();
frm.fields_dict.your_date_field.set_t_for_today();
});
The available date formats are here
yyyy-mm-dd
mm/dd/yyyy
mm-dd-yyyy
mm/dd/yy
dd-mmm-yyyy
dd/mm/yyyy
dd.mm.yyyy
dd-mm-yyyy
dd/mm/yy
1 Like
Actually, i want to change the date only has months and year.
This might solve your purpose
your_date.strftime(“%m/%Y”)
1 Like
where can i access py script?
through your bench
Where is bench? Could you tell me specifically?
how you accessing your code?
i Don’t have to access my code, i’m not a soft engineer.
Maybe i should accept that custom script above.
Hi, can i add you at Whatsapp? I have some questions about ERPnext.
sure go ahead
Man, this isn’t work at all.