+ Start a Discussion
Sean NolansSean Nolans 

SOQL query for date range

 am looking to build a query that includes a date range.
I want to be able to say departure_date_c + 330 days from now

We have this in a formula field and it looks like this 
departures_dates__r.date__c < (TODAY() + 330)

But I want to be able to edit my sql query in your tool to include this .You builder does not allow for something like this but it looks like I can manually edit your SOQL query 

Any ideas how to turn the above formual field into a query

Best Answer chosen by Sean Nolans
Raj VakatiRaj Vakati

TRY THIS .. USE LAST_N_DAYS:330 fuction 


SELECT Id FROM Account WHERE CreatedDate = LAST_N_DAYS:330