Show date's month name instead of number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 04:55 AM
Hi All,
Good Day!!!!
there is a variable name "date" [u_date] in catalog item. It is showing format as [yyyy--mm-dd].
I want to change it's format from above to February8th,2023.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:14 AM
Hello @DevYadav
Plz check the same Script it is Giving me the Format as per expectations.
var gdt1 = g_form.getValue('u_date'); var newDate = gdt1.getByFormat("MMMM dd,YYYY"); return newDate;
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:20 AM
Hi @Samaksh Wani, i've try the above code. it is showing correct format like, it is displaying month' number then date and then year. but i want to display month's name here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:24 AM
Hello @DevYadav
You need to Write the OnChange Client Script like that on the Date field.
var date = g_form.getValue('date_field');
var newDate = date.getByFormat("MMMM dd, YYYY");
g_form.setValue('date_field', newDate);
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:49 AM
Hi @Samaksh Wani, i've try your code, but it is not displaying the month's in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:17 AM