Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 03:05 AM
Hi @Simon Christens i didn't get your last comment. can you suggest what changes needs to be made on below syntax to achieve this?
function ifScript()
{
var currentDateTime = new GlideDateTime();
var endDateTime = new GlideDateTime('current.variables.end');
var difference = endDateTime.getNumericValue() - currentDateTime.getNumericValue();
var differenceInDays = difference / (1000 * 60 * 60 * 24);
if (differenceInDays >= 3) {
gs.info('Yes');
} else {
gs.info('No');
}
}