1
I am using ORM Sequelize and would like to compare only one date instead of the date with time.
I have the following date: 2021-05-06 03:00:00.0000000 +00:00
And I’m doing like this:
const dataAtual = new Date()
const lista = await myRepository.findAll({
where: {
dt_end: {[Op.lt]: dataAtual }
}
});
I’d like to compare
SELECT *
FROM tabela
WHERE dt_end < '2021-05-06'
I am using SQL Server
How can I compare only the date: 2021-05-06
and discard the rest?
Thanks, I got an idea!
– adventistaam