How can I do a SELECT in the database in which the records have a field that the format is DATE Ex: (2017-05-15) and in the WHERE clause I want for just the year. I also wanted to know if it is better to use the dates in the database in varchar format or in the same date format.