title: operator does not exist: timestamp without time zone ~~* unknown ruby code
body: <p>I am try to query users in the database when I do a search. However i am getting a specific error which is 'operator does not exist: timestamp without time zone ~~* unknown'</p>
  
  <p>In my database, the record of data_of_birth is saving in the format below. Now sure what I am missing. Code below</p>
  
  <pre><code>field == "dob"
              selected_date = Date.strptime(query, '%Y-%m-%d')
              items = Patient.joins(role: :user).where('users.date_of_birth ILIKE :search', search: "%#{selected_date}%")
  </code></pre>
  
  <p>Here how date_of birth is saving in the DB</p>
  
  <pre><code> date_of_birth: "1997-03-29 00:00:00"
  </code></pre>