You need to sign in to do that
Don't have an account?
Software Engine
Problem with DateTime in Query
Hi,
I have a custom field which type is datetime. But i should query only on date part.
Is it possible? If not possible i am giving a try to query with full datetime.
By default datetime value stores as in the Greenwich Mean Time (GMT) or Coordinated Universal Time (UTC) time zone. We have to covert the datetime field value to local time format when we querying.
What is the salesforce time format. Is it following GMT or UTC. Basing on the time format following by salesforce how much time do i need to add or subtract from the stored field value.
Ex: Actually my custom field date time stored as 5/21/2007 9:30 AM
Query: select EnteredDate__c from opportunity where EnteredDate__c = 2007-05-21T14:30// giving error
Thanks,
2007-05-05T12:34:23-08:00
for example.
HI,
As you said If i add the offset to datetime field value it is not identifying the records. I am getting the message as " No Records Matched Query ". But no errors.
If i do not add the offset to the field, i am getting the error as " Malformed Query ".
Actually when i query the field without where condition i am getting the output as follows.
Q: Select EnteredDate__c from opportunity
Ouput: 5/21/2007 9:20 AM
But when i query with the where condition by adding offset to the value, no records matching with the value.
Q: Select EnteredDate__c from opportunity where EnteredDate__c=2007-05-21T09:20:00-08:00
//No Records Matched Query.
How to fetch the records?
Thanks & Regards,
Arjun.