I am trying to get the data from the datebase with in a range of time. we are using
let contactWhere = {};
if (filter.username) {
contactWhere.username = filter.username;
}
dbSequelize.Mytable.findAll({
where: {
application_id: filter.application_id
},
include: [
{
model: dbSequelize.NeuronContact,
as: 'contact',
where: contactWhere,
required: true
}
] })
I am trying filter the date which column "time" is string.
`
dbSequelize.Mytable.findAll({
where: {
time: {
$gte : moment(msg.msgData.startDate, "DD/MM/YYYY"),
$lte: moment(msg.msgData.startDate, "DD/MM/YYYY")
},
application_id: filter.application_id
}})
`
Do I have to change the column to timestamp? or can I do this bigger smaller process on string? If I can do. How can I ? I was trying to help from here but ı coudnt. http://docs.sequelizejs.com/manual/tutorial/querying.html