You need to sign in to do that
Don't have an account?

hello guys i want to built vf for this apex class and there should be picklist showing month and depending on the month the following student list should display?
public class studentMonth {
//list<student__c> which returns the students
public static list<student__c> student(date d){
//take the start of month
date sd=d.toStartOfMonth();
//add 30 days to the start of month
date en=sd.addDays(30);
list<Student__c> st=[select name,id,Email__c from Student__c where Date_of_Birth__c>=:sd and Date_of_Birth__c<=:en];
// system.debug(st);
return st;
//studentMonth.student(date.newInstance(1996,11,20));
//list<Student__c> s=studentMonth.student(date.newInstance(1996, 10, 19));
//system.debug(s);
}
}
//list<student__c> which returns the students
public static list<student__c> student(date d){
//take the start of month
date sd=d.toStartOfMonth();
//add 30 days to the start of month
date en=sd.addDays(30);
list<Student__c> st=[select name,id,Email__c from Student__c where Date_of_Birth__c>=:sd and Date_of_Birth__c<=:en];
// system.debug(st);
return st;
//studentMonth.student(date.newInstance(1996,11,20));
//list<Student__c> s=studentMonth.student(date.newInstance(1996, 10, 19));
//system.debug(s);
}
}

hello answer or logic please