Wednesday 30 November 2011

how to find the employee list who has more than one year experiance in c#


       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

Contact Us:

Email:

Vinodkumar434@gmail.com,
vinodtechnosoft@gmail.com

Skype Name:

vinodtechnosoft