How can I compare 2 date times ?, example: '2017-12-06 15:00' and '2017-12-06 14:00' to use it in a conditional.
this is my code:
var inicio = '2017-12-06 15:00';
var termino = '2017-12-06 14:00';
if(inicio > termino){
alert("Error!");
};
But the comparison does not do it correctly.