We are creating a module that displays reports from a database and part of this module is to let users view reports by year. For users to easily choose the year of the report, we would like to create a dynamic dropdown menu listing the years. We planned to do this by checking the database for the most recent year of posted reports. So we’d like to extract the year from the given searched date. Is it possible? if so, how will it be done?