function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pavan 14pavan 14 

HOW TO GET RECORDS CREATED ON PARTICULAR DATE(Ex.. 1 st of every month) OF MONTH USING SOQL

Hi,

can anyone give me the soql query to fetch records genrated on 1st of every month.

Regards
Pavan.
Best Answer chosen by pavan 14
Asif Ali MAsif Ali M
SELECT Id, Subject, CreatedDate from Case
WHERE DAY_IN_MONTH(CreatedDate)=1 limit 100
Check out more on DATE functions (https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_date_functions.htm)
 

All Answers

Asif Ali MAsif Ali M
SELECT Id, Subject, CreatedDate from Case
WHERE DAY_IN_MONTH(CreatedDate)=1 limit 100
Check out more on DATE functions (https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_date_functions.htm)
 
This was selected as the best answer
pavan 14pavan 14
Thanks! got it