Nel

Nel

  • NA
  • 716
  • 1.1m

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

Feb 10 2012 3:14 AM
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)