I am currently working on a project that requires me to retrieve dates from a database. The goal is to replace outdated dates with newer ones as they pass.
Unfortunately, I am unsure how to achieve this and would greatly appreciate any assistance.
It seems like the current approach is not yielding the desired results.
function Load() {
var sql = "SELECT TijdVan, ID_RECORD FROM pixiocompanys WHERE TijdVan >= CURRENT_TIMESTAMP() ORDER BY TijdTot" ;
var result = sqlUtil.selectSql(sql, {} , 'default');
if (result.length === 0 ){
return;
}
var times = getTimes();
var d = new Date();
var TV = times[0].TijdVan;
var TT = times[0].TijdTot;
if( d > TV ){
var sql = "SELECT TijdVan , ID_RECORD FROM pixiocompanys" ;
}
}