jeudi 2 juillet 2015

Problems with calculating the date and time of result set in SQLite

Can someone perhaps help me with my SQL? The minute part is working, but I am getting results for the wrong day. (The result set should be empty as there is no data for May.)

SELECT s_time, s_long, s_lat FROM rides 
WHERE TIME(s_time) >= TIME("2013-05-05 00:00:00",  "0 minutes") AND 
      TIME(s_time) <= TIME("2013-05-05 00:00:00", "+1 minutes");

2013-01-13 00:00:00|-73.95105|40.774727
2013-01-13 00:00:05|-73.972969|40.78537
2013-01-13 00:00:06|-73.963913|40.757141
2013-01-13 00:00:50|-73.948898|40.711082
2013-01-13 00:00:51|-73.985619|40.744091
2013-01-13 00:01:00|-73.978271|40.757248

Aucun commentaire:

Enregistrer un commentaire