You need to sign in to do that
Don't have an account?
Rakul Srivastav
need the query to fetch records between a fixed time.
How can i get records for a query where i need to get the records which are created between 8p.m PST the previous day to 8p.m PST today. Please help me with the query in Apex.
Try Below Query Please Mark It As Best Answer If It Helps
Thank You!
Hi,
Please find the solution.
Please mark it as the Best Answer so that other people would take reference from it.
Thanks.
I have a date field as '2021-05-17T22:00:59.000+0000', now i need to check if that field falls in between Yesterday 8p.m PST to today's 8p.m PST. and yesterday and today is not a fixed date, i need to use it in query. The query which you have replied
"SELECT Id,CreatedDate FROM Account WHERE CreatedDate >= 2021-06-21T20:00:00Z AND CreatedDate <= 2021-06-22T20:00:00Z" is for a fixed date, i want here yesterday and today which is dynamic and time in 8p.m PST.
I'm new to Salesforce, please guide me.