You need to sign in to do that
Don't have an account?
Jonathan Czar
How do I find all Contacts created in the last hour?
I am writing a SOQL in DataLoader to pull all Contacts created in the last hour. However, I cannot find any date function to use. I tried CREATEDDATE >=LAST_N_DAYS:0.0417, but it only accepts integers. Is there a function I can use?
Thanks in advance
PS Sorry if I put this in the wrong topic group. I was not sure where it would go. This is my first posted question.
Hope this helps.
If you want to get all the contacts that are created in last one hour you can use this query.
datetime dt = datetime.newInstance(system.today().year(),system.today().month(),system.today().day(),system.now().hour()-1, 0, 0);
List<Contact> conList=[select id,name from Contact where createdDate>: dt];
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha