- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2016 01:19 PM
We are creating a custom application to keep track of security exceptions. We have a date field on the form for the Next Review Date. How do we set the default value for that field to be six months from the current date?
Solved! Go to Solution.
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2016 01:30 PM
Put this in the default value of the field dictionary
javascript: var gdt = new GlideDateTime();gdt.addMonthsLocalTime(6);gdt.getDate();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2016 01:37 PM
That's it. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2025 05:38 AM
HI SHARAN,
I have the same scenario.default value for that field to be six months from the current date.still it is not working.Can you help me with the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2020 03:00 AM
Hi Sharonjanisch,
Try adding the code in default value of your Date/Time field:
javascript:var gdt = new GlideDateTime();gdt.addMonths(6);gdt.getDisplayValue();
Regards,
Subhojit Das