mardi 1 mars 2016

I want to get the data based on todays date and not based on time (sequelize and sqlite)

list: function(req, res, next){
        var body = req.body;
        models.BillingHeader.findAll({
          where:{
            bill_date_and_time: new Date(),
            bill_status: {
               $and: {
                 $ne: "C",
             }


             }
          }
        }).then(function(BillingHeader) {
            res.status(200).send({data: BillingHeader});
        });
    }

When i am using new Date then its comparing with both date and time and then i get the data ........even if there is a differnce of seconds its showing data = null.Here i want to compare only date and not time and based on todays date i will get the data..........

Aucun commentaire:

Enregistrer un commentaire