- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 01:44 AM - edited 09-22-2023 02:20 AM
Hi,
I'm working on Flows and one of the action needed after triggering the conditions is to set the value of these fields. Please see attached. Would like to seek help on what is the script on returning the date/time in the following fields:
1. Last Contact Date = today’s date
2. Next contact date = 5 Business days
Thanks for the help.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:21 AM - edited 09-22-2023 02:50 AM
Hello @icelazer
you can get dates by below lines adding into the inline scripts for variables:
1. Last contact date:
var today = new GlideDateTime();
return today.getDisplayValue();
2. Next Contact Date:
var nextDate = new GlideDateTime();
return nextDate.addDays(5);
for your reference see below ss:
Please mark my answer helpful and solution accepted if it serves the purpose..
Regards,
Vaibhav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:52 AM
Try
businessDays.addDaysUTC(5);
return businessDays;
Hopefully, this will resolve your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 03:49 AM
@Vaibhav never mind it. I already tried this:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:21 AM - edited 09-22-2023 02:50 AM
Hello @icelazer
you can get dates by below lines adding into the inline scripts for variables:
1. Last contact date:
var today = new GlideDateTime();
return today.getDisplayValue();
2. Next Contact Date:
var nextDate = new GlideDateTime();
return nextDate.addDays(5);
for your reference see below ss:
Please mark my answer helpful and solution accepted if it serves the purpose..
Regards,
Vaibhav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:45 AM
Thank you @Vaibhav . However the script for number 2 is not working on my end.
I also tried this:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:52 AM
Try
businessDays.addDaysUTC(5);
return businessDays;
Hopefully, this will resolve your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:58 AM
Hi @Vaibhav yes it works! Thank you!