[SalesForce] Documentation for hidden SOQL date literals (e.g. N_DAYS_AGO)

The current documentation for SOQL Date Literals does not have N_X_AGO on its list. In fact I had never seen the AGO date literals on any version of the documentation. So I am wondering if there are more "hidden" date literals and which rock they are hiding under.

Best Answer

These are not the date literals you're looking for....... :-)

The trick is that the filters that are available for filter criteria in list views and reports are secretly available in SOQL as well. You'll find them by checking out this link below. Most of these are already on your list, but the missing ones are here as well, just replace spaces with underscores!

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm

Related Topic