- 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:09 AM
Hi Kishore,
Can you try below code:
var gDate = new GlideDate();
gDate.setValue(current.u_date.getDisplayValue());
current.u_quarter= 'Q' + (Math.floor((gDate.getMonth() - 1) / 3) + 1) ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:12 AM
Hi Gowrish
not working, please

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:22 AM
var test = new GlideDateTime(check);
var mn = test.getMonth();
var quar = Math.ceil(mn/3);
current.u_quarter= 'Q'+quar;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 11:23 AM
var test = new GlideDateTime(current.u_date);
var mn = test.getMonth();
var quar = Math.ceil(mn/3);
current.u_quarter= 'Q'+quar;