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'
In my database, the record of data_of_birth is saving in the format below. Now sure what I am missing. Code below
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}%")
Here how date_of birth is saving in the DB
date_of_birth: "1997-03-29 00:00:00"