How to add days to glideDate object ?

Manikantahere
Tera Contributor

How to add days to the glide date object and no need to consider time ?

2 REPLIES 2

Bhavya11
Kilo Patron

hI @Manikantahere ,

 

Please try this way 

 

var gd = new GlideDate();

gd.addDays(5); // Adds 5 days to the current date

gs.info('Updated Date: ' + gd.getDisplayValue()); // Outputs: Updated Date: 2024-10-28

 

 

Please mark helpful & correct answer if it's really worthy for you.

 

 

Thanks,

BK

Harish Bainsla
Tera Sage
Tera Sage

Hi @Manikantahere  try below script

var glideDate=new GlideDate();
glideDate.addDays(3);
gs.print(glideDate);
HarishBainsla_0-1729683667761.png

 

HarishBainsla_1-1729683684677.png

if my answer helps you please mark helpful and accept solution