This should do what you require but will need some configuration:
$.fn.dataTableExt.afnFiltering.push(
function(oSettings, aData, iDataIndex) {
if (typeof $('#duration').val() !== "undefined") {
var duration = $('#duration').val();
var durationBits = duration.split(" ");
var durationInt = ~~durationBits[0];
var durationString = durationBits[1];
var now = moment("2013/08/11", "YYYY/MM/DD");
var targetDate = now.subtract(durationInt, durationString);
var iDateCol = 4;
var colDate = aData[iDateCol];
if (duration === "All") {
return true;
} else {
return moment(colDate, "YYYY/MM/DD").isSameOrAfter(targetDate);
}
} else {
return true;
}
}
);
You'll also need momentjs to be available. I've got a contrived working example here. We basically take a date and use moment to test whether the date in the column is the same or after the date now with the relevant subtraction having been carried out. We then redraw the table when the select value changes. Hope that helps.