Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Show date's month name instead of number

DevYadav
Tera Contributor

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 

11 REPLIES 11

Samaksh Wani
Giga Sage

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

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'

Hello @DevYadav 

 

What is your expected output

and What output you are getting from my script plz mention.

 

 

Hi @Samaksh Wani, I want to show date format in i.e. "December 20th, 2022".
variable name is: date [u_date].
type is: date