If you want to "automatically" load the current year / month, use the SQLite strftime function with the modifier 'now' and the format mask '%Y-%m' .
select strftime('%Y-%m', 'now');
Now, coming to your question:
Now I want to get data only for the current month.
Well, this is a mess. You cannot save the date as a datetime type ; instead, it is stored as a string in SQLite format, which it cannot parse using date functions. So you have to convert it to a format that SQLite can understand .
You can do this using the regular substr function
substr(exp_date, 7) || '-' || substr(exp_date, 4,2) || '-' || substr(exp_date, 1,2)
Thus, it will be a hidden format dd/mm/yyyy to YYYY-mm-dd .
Thus, the full query will look like this:
SELECT * FROM incomexpense WHERE Strftime('%Y-%m', 'now') = Strftime('%Y-%m', Substr(exp_date, 7) || '-' || Substr(exp_date, 4, 2) || '-' || Substr(exp_date, 1, 2))
See how it works here .