I dont know if someone is still looking for this, but Amit's solution will give u result on a partilar day, particular minute and second. I guess the ask was records created on a day. Simple solution will be: CreatedDate > 2019-03-17T00:00:01.00Z and CreatedDate < 2019-03-17T23:59:59.00Z
this will give the result for a particular day (whole day)
You can try the below Query. SELECT Id, Name FROM Account WHERE CreatedDate=Date.Today(); You can also give a date while filtering. SELECT Id,Name FROM Account Where CreatedDate = 2021-07-09T06:46:56.000Z
If you find your Solution then mark this as the best answer.
Try this SELECT Id, Subject, CreatedDate FROM Case WHERE DAY_IN_WEEK(CreatedDate) = 6 AND DAY_ONLY(CreatedDate) = 2023-09-29
We use the DAY_IN_WEEK function to check if the day of the week when the Case was created is equal to 6, which corresponds to Friday (Sunday is 1, Monday is 2, and so on). We use the DAY_ONLY function to compare the date part of the CreatedDate field to '2023-09-29',
1) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
2) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_date_functions.htm
Let us know if this will help you
Thanks
Amit Chaudhary
Please let us know if this will help you
Thanks
Amit Chaudhary
Use the below query it will work.
date d = system.today().addDays(-30);
Account [] acc= [select id from account where createdDate = :d];
Thanks,
Vijay
1) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
For a spacific date please try below query
For YESTERDAY :- Starts 12:00:00 the day before and continues for 24 hours. For this month :-THIS_MONTH :- Last n days :- LAST_N_DAYS:n Let us know if this will help you
Simple solution will be:
CreatedDate > 2019-03-17T00:00:01.00Z and CreatedDate < 2019-03-17T23:59:59.00Z
this will give the result for a particular day (whole day)
You can try the below Query.
SELECT Id, Name FROM Account WHERE CreatedDate=Date.Today();
You can also give a date while filtering.
SELECT Id,Name FROM Account Where CreatedDate = 2021-07-09T06:46:56.000Z
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi
SELECT Id, Subject, CreatedDate FROM Case WHERE DAY_IN_WEEK(CreatedDate) = 6 AND DAY_ONLY(CreatedDate) = 2023-09-29
We use the DAY_IN_WEEK function to check if the day of the week when the Case was created is equal to 6, which corresponds to Friday (Sunday is 1, Monday is 2, and so on).
We use the DAY_ONLY function to compare the date part of the CreatedDate field to '2023-09-29',