I am storing from-date and to-date in my sqlite db in 2012-02-15 00:02:03 format. Now how can retrieve this. I tried with the following query .. where did i go wrong.
select category,sum(amount) from inbox where strftime(currentdate) > strftime(fastdate)
it shows error. can any one help me to solve this
You are not using strftime correctly.
strftime('format', 'time')It takes a format and a string version of the time. You are not putting the time in as a string at all.
You can see all the different formats and some examples here.
Your comparison should look like this…
strftime(‘%s’,’currentdate’) > strftime(‘%s’,’fastdate’)