- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:34 AM
tmrw is printing as undefined? what might be the reason for this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:53 AM
Hi @KM SN
Try this
var today = new GlideDate();
gs.print(today);
today.addDaysUTC(1);
gs.print(today);
addDaysUTC - Adds a specified number of days to the current object but doesn't return any value, so tmrw is showing as undefined
You can use the same object 'today'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:54 AM
Most of the handy functions available in GlideDateTime are not in GlideDate. Use GlideDateTime, then you can get just the date from that if you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:53 AM
Hi @KM SN
Try this
var today = new GlideDate();
gs.print(today);
today.addDaysUTC(1);
gs.print(today);
addDaysUTC - Adds a specified number of days to the current object but doesn't return any value, so tmrw is showing as undefined
You can use the same object 'today'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2024 10:54 AM
Most of the handy functions available in GlideDateTime are not in GlideDate. Use GlideDateTime, then you can get just the date from that if you want.