- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 06:35 AM
In a scoped application I'm allowed to use in my UI Action, what can I replace this with, can't find a simple answer:
current.resolved = gs.nowDateTime();
?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 06:53 AM
Hi Dave,
use the following script in scripts background to get the current date/time in system
var gdt = new GlideDateTime();
current.resolved = gdt.getDisplayValue();
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 06:49 AM
you can try:
current.resolved = new GlideDateTime().getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 07:10 AM
thankyou Hector. two options to do it.
I think I tried this option but crucially forgot .getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 06:53 AM
Hi Dave,
use the following script in scripts background to get the current date/time in system
var gdt = new GlideDateTime();
current.resolved = gdt.getDisplayValue();
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 07:17 AM
Thankyou Ankur