You need to sign in to do that
Don't have an account?
Data Loader
Hi Friends,
I am trying to extract records from salesforce through the data loader
All I want to do is to extract contacts fromn a particular record type and on a particular date.
So I am doing
select * from contacts where record type = 'some number' and createddate=2011-9-29.
But I get an error saying that createddate has to of type datetime and should not have quotes enclosed to it.
I am supplying date type value and am not enclosing in quotes them why am I getting an error.
Please tell me the right way to extract contact records based on date and recordtype.
Thanks,
Trick009
Yes, The T00:00:00Z represents midnight so the example query I posted returns all contacts created between 2011-09-29 midnight to one second before 2011-09-30 midnight of a specified Record Type.
All Answers
I got it to work by using this query:
SELECT Id, Name, CreatedDate FROM Contact WHERE CreatedDate > 2011-09-29T00:00:00Z AND CreatedDate < 2011-09-30T00:00:00Z AND RecordTypeId = '123456789012345'
BTW, I found that you cannot use SELECT *. You have to specify the individual fields.
Hi Sharris,
Thanks a lot for a reply,
I want to clarify something about T00:00:00Z.Could you please expalin me what time it would represent.?Is that midnight?
Thanks,
Trick009
Yes, The T00:00:00Z represents midnight so the example query I posted returns all contacts created between 2011-09-29 midnight to one second before 2011-09-30 midnight of a specified Record Type.
Thank You