+ Start a Discussion
Brad007Brad007 

Date Check

I have a custom feild Placmnt_Start_Date_Arrive__c from Oppportunity object.

 

    This should check for a condition as 

     Placement Start Dt (Arrival) less than LAST 30 DAYS     

     AND Placement Start Dt (Arrival) equals LAST 60 DAYS   

How can i do this in apex.

 

Thank you

Best Answer chosen by Admin (Salesforce Developers) 
hisrinuhisrinu

You can try with Last_N_days : 60

 

select id from account where yourdatefield<Last_N_days : 60 or yourdatefield<Last_N_days : 30

All Answers

BA_AdminBA_Admin

Is that a checkbox, if it is a checkbox then you can do it in workflow by using field update

hisrinuhisrinu

You can try with Last_N_days : 60

 

select id from account where yourdatefield<Last_N_days : 60 or yourdatefield<Last_N_days : 30

This was selected as the best answer