Pravin Ghadge
posted
367 posts
since
Jun 23, 2010
from
|
|
Re: How to select only those rows from access database table with date from the current year
|
|
|
|
|
|
|
|
|
|
|
hi,
oleDbAd2.SelectCommand.CommandText = "SELECT Brdog, Datadog, Bravtobusi, VkiznosbezDDVDen,Vaznost from Dogovor where Year(Datadog)=?"; oleDbAd2.SelectCommand.Parameters.Add("@Datadog", DateTime.Now.Year ); //I
|
|
|
|
|
|
Vulpes
posted
5419 posts
since
Feb 28, 2011
from
|
|
Re: How to select only those rows from access database table with date from the current year
|
|
|
|
|
|
|
|
|
|
|
Try:
oleDbAd2.SelectCommand.CommandText = "SELECT Brdog, Datadog, Bravtobusi, VkiznosbezDDVDen,Vaznost from Dogovor where Year(Datadog) = ?";
oleDbAd2.SelectCommand.Parameters.Add("@Datadog", OleDbType.Int).Value = DateTime.Now.Year;
EDIT: Pravin beat me to it - but basically same answer :)
|
|
|
|
|
|
Nel
posted
212 posts
since
Feb 22, 2011
from
|
|
Re: How to select only those rows from access database table with date from the current year
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|