3
Answers

How to select only those rows from access database table with date from the current year

Ask a question
Nel

Nel

12y
1.6k
1
Hello,

Can anybody help me please how to select only those rows from the table which have current yera for date.year?

oleDbAd2.SelectCommand.CommandText = "SELECT Brdog, Datadog, Bravtobusi, VkiznosbezDDVDen,Vaznost from Dogovor where Datadog=?";
 
  oleDbAd2.SelectCommand.Parameters.Add("@Datadog", DateTime.Now.Year ); //I don't know how to write thic line

Thanks in advance.

Answers (3)