Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 01:50 AM
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 02:03 AM
Hi
I have tried the below code in my Background script, let me know if this is what you want -
var start = new Date(2015,06,01),//6 July 2015
end = new Date(2015,11,01),//1 Nov 2015
today = new Date();//todays date
gs.print("Start="+start);
gs.print("End="+end);
gs.print("Today="+today);
var timeBetweenStartAndEnd = (end - start);
var timeBetweenStartAndToday = (today - start);
gs.print("Rounded: "+Math.round(timeBetweenStartAndToday / timeBetweenStartAndEnd * 100) + "%");
Hope this helps.
Regards,
Omkar Mone
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 02:03 AM
Hi
I have tried the below code in my Background script, let me know if this is what you want -
var start = new Date(2015,06,01),//6 July 2015
end = new Date(2015,11,01),//1 Nov 2015
today = new Date();//todays date
gs.print("Start="+start);
gs.print("End="+end);
gs.print("Today="+today);
var timeBetweenStartAndEnd = (end - start);
var timeBetweenStartAndToday = (today - start);
gs.print("Rounded: "+Math.round(timeBetweenStartAndToday / timeBetweenStartAndEnd * 100) + "%");
Hope this helps.
Regards,
Omkar Mone

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 04:21 AM
Hi Shilpi,
If my response helped you, can you close this thread by hitting the correct answer so that it would be useful for others as well.
Regards,
Omkar Mone