Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Set a future date

RayRoulstone
Tera Expert

I have a date variable in a record producer. How would I set the default date to 10days in the future?

1 ACCEPTED SOLUTION

Tej2
Tera Expert

Hi Ray,

You would need to set the default date in the Record Producer Variable.

Key in this value in the default value field of the variable.

javascript:var dt = new GlideDateTime();dt.addDays(10);dt.getDisplayValue();

Refer to screenshot below:

find_real_file.png

You should see the field populated as below:

find_real_file.png

Please mark helpful, if it did indeed

Thanks,

Tej

View solution in original post

5 REPLIES 5

Thank Tej. Thats just what I was looking for.