Use Laravel 5
I would like get rows included between 2 dates in my database (sqlite), I use this command:
$trackers = Tracker::whereBetween('detect_at', [$date1, $date2])->where("serial", "uhu")->get();
But reply nothing.
Entire request :
$date1 = "2015-07-13 03:53:38";
$date2 = "2015-07-13 03:58:36";
$trackers = Tracker::whereBetween('detect_at', [$date1, $date2])->where("serial", "uhu")->get();
example of one row in my database :
id serial latitude longitude altitude accuracy detect_at created_at updated_at
728 uhu 48.0491 -1.74138 0 20 2015-07-13 03:54:38 2015-07-02 13:40:15 2015-07-02 13:40:15
I don't understand, I need help thx ^^
Aucun commentaire:
Enregistrer un commentaire