I posted a question regarding doing a date based calculation !
I wasn’t expecting but it worked superbly .
// Function to convert date from yy/mm/dd to yyyy-mm-dd
function reformatDate(dateStr) {
const [year, month, day] = dateStr.split('/');
const fullYear = '20' + year;
return `${fullYear}-${month}-${day}`;
}
// Assuming the column containing the date is named 'date_column'
const givenDateStr = $(date_column);
const givenDate = new Date(reformatDate(givenDateStr));
const comparisonDate = new Date("2023-01-01");
if (givenDate > comparisonDate) {
return "Yes";
} else {
return "No";
}