How to customize the date and time of Lead creation

Screenshot from 2024-10-04 14-37-24

Hello guys,
In the above SS you can see the 2w 3w the date and time of the lead created, I want to show directly the Date of the Lead instead of this 2w,3w.
How should i handle this?

That for, you have to apply the listview client script. so please check it.

Before:

After:

ListView Client Script:

frappe.listview_settings['Lead'] = {
    refresh: function(listview) {
        listview.$result.find(".frappe-timestamp").each(function() {
            const timestamp = $(this).attr("data-timestamp");
            if (timestamp) {
                const formatted_date = frappe.datetime.str_to_user(frappe.datetime.convert_to_user_tz(timestamp).split(' ')[0]);
                $(this).text(formatted_date);
            }
        });
    }
};
2 Likes

Iā€™m also tried the same and now i used your code too, but still it not changed.

Screenshot from 2024-10-05 23-40-47

Change the Apply To to List

1 Like

Thank you. Its my mistake i didnt noticed that, now its working.