I want to know how I can make this comparison, that it read the y dates that are stored in the database and compare them with data x, and then show only the line that fit into that comparison ...
texto.executeSql('select * from schedule ORDER BY DATETIME(dt_schedule)', [], function (texto, results){
tamanho = results.rows.length;
for(i=0; i<tamanho; i++){
item = results.rows.item(i);
texto += ['<tr><td>' + item['id_schedule'] + '</td><td>' + item['id_salesman'] + '</td><td>' + item['id_customer'] + '</td><td><input type="datetime-local" class="form-control input-lg" id="data_carregar" value=' + item['dt_schedule'] + ' disabled></td><td><input type="text" id="nota_carregar" class="form-control input-lg" value='+ item['note']+' disabled></td><td><button type="button" class="btn-danger btn-lg excluir" value="'+ item['id_schedule'] +'">Excluir</button></td><td><button type="button" class="btn btn-warning btn-lg editar" data-toggle="modal" data-target="#update" value='+ item['id_schedule'] +'>Editar</button></td></tr><br>'];
var data_agora = '2018-03-12T04:54';
if(texto == new Date(data_agora)){
//mostra resultado