0
How can I find the records on two dates in the bank Sqlite?
In mysql I know it is through BETWEEN, but I don’t know how you do it in Sqlite.
0
How can I find the records on two dates in the bank Sqlite?
In mysql I know it is through BETWEEN, but I don’t know how you do it in Sqlite.
1
Sqlite uses BETWEEN as stated in the comment, follow example:
SELECT * FROM Pessoa WHERE Data BETWEEN '2000-01-01' AND '2015-01-01'
Note: If you tried with BETWEEN and failed the problem may be in date format, Sqlite expects the date to be in a format YYYY-MM-DD, may be that he is treating his search as string.
-3
Just put . Asdate := Strtodate(Ndata); the date may be in DD/MM/YY itself. Follows code:
Dms.Qsq4.Close;
Dms.Qsq4.SQL.Clear; Dms.Qsq4.SQL.Add(Sql);
Dms.Qsq4.Parambyname('DATAINI'). Asdate := Strtodate(Ndataini);
Dms.Qsq4.Parambyname('DATAFIN'). Asdate := Strtodate(Ndatafin);
Dms.Qsq4.Open;
Dms.Qsq4.first;
Thank you, solved!
Browser other questions tagged sqlite
You are not signed in. Login or sign up in order to post.
In the Sqlite is
BETWEENhttps://www.sqlite.org/lang_expr.html– Valdeir Psr