Abhishek Singh6
Kilo Guru

@Anil74, You can use gs.monthsAgo(15) function to get a 15 months before today's date. Please refer below SS for syntax :

 

Screenshot 2023-02-28 at 5.51.27 PM.png

You can use below code to get 15 months date before a given date (not today's date) :

 

var dateA = "2023-02-28 08:00:00";

var gdt = new GlideDateTime(dateA);
gdt.addMonths(-15);
gs.info(gdt.getDate());

Please mark helpful and accept solution if it helped you.

View solution in original post