On 9/12/2013 1:38 AM, jwzumwalt wrote:
I have not used the date function in select statements before.
I have valid entries for the current month, what am I doing wrong?
SELECT * FROM "entry" WHERE
bankdate > date('now','end of month','-1 month')
AND bankdate < date('now','start of month','+1 month')
'start of month' is a valid modifier, but 'end of month' is not - it's
just an exercise in wishful thinking. See
http://sqlite.org/lang_datefunc.html . Make it
bankdate > date('now','start of month','-1 day')
-- or
bankdate >= date('now','start of month')
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users