- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:00 AM
My script is not working
var gDate = new GlideDate(current.u_date);
Current.u_quarter= 'Q' + (Math.floor((gDate.getMonth() - 1) / 3) + 1) ;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:23 AM
Hi,
I have done some modification in script , it is working now
Script :
var gDate = new GlideDate();
gDate.setValue(current.u_date);
current.u_quarter= 'Q' + (Math.floor((gDate.getMonthLocalTime() - 1) / 3) + 1) ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:23 AM
Hi,
I have done some modification in script , it is working now
Script :
var gDate = new GlideDate();
gDate.setValue(current.u_date);
current.u_quarter= 'Q' + (Math.floor((gDate.getMonthLocalTime() - 1) / 3) + 1) ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2019 08:54 AM
Hi,
Can one of you help me understand where to put this code? We're new to Service Now.
Our specific need is to show the Due Date (requested_by) field on Demand as the Quarter instead of the full date. I've created a new field called Quarter (u_quarter).
I've attempted to create a client script based on change for the Due Date field but get various errors.
Thanks for the help.
Bob