it's a date time field (my_date_field__c)
I have to update the record if my_date_field__c
is within the past 24 hours
(> yesterday at 5pm and <= today at 5pm
)
I was thinking to use a logic to add 5pm hours in YESTERDAY function to make it 5 pm from TODAY function
select id,my_date_field__c from employee__c where my_date_field__c = TODAY and HOUR_IN_DAY(my_date_field__c ) = 5
but it does not seems to be working and for testing I set the my_date_field__c
value to be 5/28/2021 5:00 PM
Any idea how to achieve this soql/apex?