+ Start a Discussion

How to claiculate the date in IF condition

Hi All,


    please anyone help me , how to claiculate the date in the IF condition.


    EX : IF(Modified date - Created date >= 21)

              { ----------------------}


     In the given condition both filelds return type is Date only. When i exucuted the above code in trigger then i got a error

like "Method not found".



if both the fields are date fields u can make use like below otherwise if it datetime then get the date component from the datetime and use like below to get the days in between given dates
Modifieddate.daysBetween(Created date);