title: Retrieve data from a certain date in SQLite
body: <p>I'm having a problem retrieving data from my SQLite database based on a certain month. I've looked around and saw people using strftime in a WHERE clause and I've tried this, but I'm getting mixed results. I'm either getting all the data in the database regardless of the date, or I'm getting no results but no errors or exceptions are appearing. I'm wondering if anyone would have a solution to this?</p>
  
  <p>In my table I have a column called "Date" which is TEXT (string in my Model class) and I'm saving data in the format of dd/MM/yyyy, but after reading around I thought it was maybe the format I'm saving it as that was causing the problem so I tried with yyyy-MM-dd and dd-MM-yyyy also, but it doesn't solve the problem.</p>
  
  <p>I've also tried different select statements to see if that helped. This returns all data rather than only data from January;</p>
  
  <pre><code>var selectStmt = "SELECT * FROM SleepTrackerModel WHERE strftime('%m', '01')";
  SleepHistory = _dbHelper.Read&lt;SleepTrackerModel&gt;(selectStmt);
  </code></pre>
  
  <p>The following returns no data;</p>
  
  <pre><code>var selectStmt = "SELECT * FROM SleepTrackerModel WHERE strftime('%m', 'Date') = '01'";
  SleepHistory = _dbHelper.Read&lt;SleepTrackerModel&gt;(selectStmt);
  </code></pre>
  
  <p>I've also tried listing all column names rather than using the *. I can't really find any help other than the way I've been using. SleepHistory is an ObservableCollection. What I'm trying to do is when the user clicks a button representing each month of the year, they'll be shown the data for that month.</p>
  
  <p>Any help would be great. Thanks.</p>