You need to sign in to do that
Don't have an account?
Artemiy
Comparing Dates
I would like to select all objects (e.g. opportunities or other) with CloseDate within next 7 days. I am trying to use the following code:
but I am getting "Compile Error: unexpected token: MyDate at line..."
What expression should I use for my query?
Code:
date MyDate = system.today().adddays(7); Opportunity[] opps = [select name from Opportunity where CloseDate < MyDate];
but I am getting "Compile Error: unexpected token: MyDate at line..."
What expression should I use for my query?
as in, [SELECT Id FROM Opportunity WHERE CloseDate = NEXT_N_DAYS:7]