Convert Date Format in Email Notification

Dan Brown2
Kilo Sage

Is there a way to change a date field to a format of MMMM yyyy on a notification at all?

Many thanks,

Dan

1 ACCEPTED SOLUTION

dvp
Mega Sage
Mega Sage

Try the below script and see if it works

var cdt = new GlideDate();  
cdt.setValue(current.YOUR_DATE_FIELD);   
cdt.getByFormat("MMMM YYYY")

the script only works for date field not date/time field

View solution in original post

3 REPLIES 3

Deepak Ingale1
Mega Sage

Notification date time follows the format of user context under which notifcation is fired, there is no easy way to do it OOB.

If you have to do, you might want to write your own script to perform this conversion

 

Note: Please mark reply as correct / helpful if it has answered your question.

Dan Brown2
Kilo Sage

Thanks for the reply,

I have tried several notification email scripts, but with no luck - are there any resources that you are willing to share that might point me in the right direction?

Cheers,

Dan

dvp
Mega Sage
Mega Sage

Try the below script and see if it works

var cdt = new GlideDate();  
cdt.setValue(current.YOUR_DATE_FIELD);   
cdt.getByFormat("MMMM YYYY")

the script only works for date field not date/time field