title: Selecting data from database based on date
body: <p>hope you fine and well,</p>
  
  <p>i have a table that contains persons information and i have a registration date column in the table, i want to to fetch the registered people in specific date.</p>
  
  <p>to be more specific i want to enter some date in html input then to select from database based on this date.</p>
  
  <p>i tried two solutions but they failed actually:</p>
  
  <ol>
  <li><p>by entering the full date : this will work just with full date, for example if i entered 2016-1-1 i will get the results of this date, but if i want to return all the people who registered in 2016-1 or 2016 my query will fail since these values are not equal the dates in the table !</p></li>
  <li><p>using regular expression, its okay but it will fail again ! if i entered 2016-1 for example , the query will return the results of 2016-11 also ! </p></li>
  </ol>
  
  <p>so any ideas ?! or any better regular expressions ?! </p>
  
  <p>regards.</p>