You need to sign in to do that
Don't have an account?
birdofprey
Able to do a SOQL on dates only prior to a specific date.
I want to be able query starting 2 weeks ago and prior.
This example
Select Name From Contacts Where CreatedDate <= LAST_N_DAYS:14
This would query me everything from Today() till Today()-14Days.
What I really need is everything that is prior (Today()-14Days).
You can query
example:
Select Name from Contacts where day_only(CreatedDate) < = 2012-11-30
Below is the reference Link for some more Date functions that can use in SOQl.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_date_functions.htm
For formula feild you can select formul result type Date/time
and enter the formula
{!Now() -14}
This gives the 14 days perior to today.
I hope it will work. I want to know , Are asking about creating formula field or using in soql query?
For Date/Time : {!NOW()-14}
For Date : {!Today() -14}