title: How to search records using a date
body: <p>I am using a <code>datagridview</code> to show student records..</p>
  
  <p>I want to display records filtered by the date of birth of the hosteler.</p>
  
  <p>When I search the data by selecting 11/09 from a <code>datetimepicker</code> using the custom format <code>dd/mm</code> and it is showing nothing.</p>
  
  <p>How can I display all records by matching only dd/mm while ignoring the year?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Try
      con = New OleDbConnection(cs)
      con.Open()
  
      cmd = New OleDbCommand("SELECT HostelerID as [Hosteler ID],HostelerName as [Hosteler Name],DOB,HostelName as [Hostel Name],RoomNo as [Room No],DateOfJoining as [Date Of Joining],Purpose,FatherName as [Father's Name],MobNo1 as [Mobile No],Phone1 as [Phone No],MotherName as [Mother's Name],MobNo2 as [Mobile No 2],City,Address,Email,ContactNo as [Contact No],InstOfcDetails as [Ins/Ofc Details],Phone2 as [Phone No 2],Agreement,GuardianName as  [Guardian Name],GuardianAddress as [Guardian Address],MobNo3 as [Guardian Mobile No],Phone3 as [Guardian Phone No],FixedDeposit as [Fixed Deposit],CompletionDate as [Completion Date],Photo,DocsPic as [Docs Pic] from Hostelers where DOB like #" &amp; DateTimePicker1.Text &amp; "# order by HostelerName", con)
  
      Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd)
      Dim myDataSet As DataSet = New DataSet()
  
      myDA.Fill(myDataSet, "Hostelers")
  
      DataGridView6.DataSource = myDataSet.Tables("Hostelers").DefaultView
  
      con.Close()
  Catch ex As Exception
      MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  End Try
  </code></pre>