Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-31-2019 08:06 AM
Hi
How to set a current year to single line text variable in service catalog ?
javascript:gs.now() is returning 07-31-2019 . But I need only current year 2019 .
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-31-2019 08:21 AM
Hi,
Try using javascript: var gdt = new GlideDateTime(gs.nowDateTime());gdt.getYear();
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2024 07:34 AM
I found something that works:
var gdt = new GlideDateTime();gdt.getYearLocalTime()