- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 08:32 PM
Hi,
While adding 1 day to the current date, how to set the tiem field alone to 12.00.00?
var gdt = current.sys_created_on;
Trying to add a day here.
Please help me on this.
Thanks,
Vinitha.K
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 09:22 PM
Please check if this helps. Sample Script
var dateDueDate = current.sys_created_on;
var dueDate = new GlideDateTime(dateDueDate);
dueDate.addDaysUTC(1);
var arrDate = [];
arrDate = dueDate.toString().split(' ');
current.due_date.setDisplayValue(arrDate[0]+ ' 12:00:00','yyyy-MM-dd HH:mm:ss');
Reference: Set date to specific time

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 08:36 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 09:22 PM
Please check if this helps. Sample Script
var dateDueDate = current.sys_created_on;
var dueDate = new GlideDateTime(dateDueDate);
dueDate.addDaysUTC(1);
var arrDate = [];
arrDate = dueDate.toString().split(' ');
current.due_date.setDisplayValue(arrDate[0]+ ' 12:00:00','yyyy-MM-dd HH:mm:ss');
Reference: Set date to specific time