Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE table_17161 ( "Suburb" text, "Population (in 2008)" real, "Median age (in 2006)" text, "Mean household size (in 2006)" text, "Area (km\u00b2)" text, "Density (/km\u00b2)" real, "Date first settled as a suburb" real, "Gazetted as a Division Name" text )

### Question ###
What is the date settled for 40 years?

### Accurate SQL ###

SELECT "Date first settled as a suburb" FROM table_17161 WHERE "Median age (in 2006)" = '40 years'