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 05:00 AM
Hello @DevYadav
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:04 AM
Hi @Samaksh Wani, thanks for the code, but I want to show month's name here i.e. "June" for '6' or "February" for '2'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:08 AM
Hello @DevYadav
What is your expected output
and What output you are getting from my script plz mention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:12 AM - edited 07-21-2023 06:14 AM
Hi @Samaksh Wani, I want to show date format in i.e. "December 20th, 2022".
variable name is: date [u_date].
type is: date