DateTime dtnow = DateTime.Now;
int day = dtnow.Day;
int month = dtnow.Month-1 ;
int year = dtnow.Year - 1;
DateTime dtc = new DateTime(year,month,day);
DataTable dt = clsCourse.getCourse("select * from emp where djoin<='"+dtc+"'");
database table:
create table emp
(
empName varchar(100),
djoin datetime
)
No comments:
Post a Comment