How to retrives only years from date time picker

Aug 24 2009 4:47 AM
 sql = "SELECT DATEPART("yyyy",dates) FROM summary WHERE plants = '" & yieldsummary.cbPlant.Text & "'"
Hi, I am now want to retrieve only year from my table(summary),field name(dates). So i am facing the problem on how to display the year in combo Box. my sql statement as above. the error disply"No value given for one or more required parameters"Thanks

Answers (2)