Ankur Bawiskar
Tera Patron

@sasikanth1 

you are correct on using GlideDateTime.subtract() method.

It's just that formatting needs to be corrected.

the date/time value you are passing to script include must be in logged in user's format as different users will have different date formats.

Ensure you set the correct value when you set the date/time in GlideDateTime object.

Can you share your script here and not screenshots?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader