How to compare %d/%m/%Y strftime SQL

277 views Asked by At

I got some problems with this select :

 actu = "SELECT * FROM REGISTRO WHERE strftime('%d/%m/%Y',Fecha) BETWEEN strftime('%d/%m/%Y', '" + FechaIni + "') AND strftime('%d/%m/%Y','" + FechaFin + "') AND strftime('%H:%M:%S',Hora) BETWEEN strftime('%H:%M:%S', '" + HoraIni + "') AND strftime('%H:%M:%S','" + HoraFin + "')";

Where FechaIni and FechaFin are strings with values like: dd/mm/yyyy then... the sentence should be some like..:

 SELECT * FROM REGISTRO WHERE strftime('%d/%m/%Y',Fecha) BETWEEN strftime('%d/%m/%Y', '05/05/2014') AND strftime('%d/%m/%Y','31/12/2014')

I got like 300 rows in my database between my dates but nothing returns.

Thanks

0

There are 0 answers