You need to sign in to do that
Don't have an account?
Probs while query DateTime field
Hi guys, it's me again.
I still can't get how to query date/time field. It's written in documentation that SFDC API can recognize fieldExpression for date/time fields in format "YYYY-MM-DDTHH:MM:SSZ". I use this mask in my query but didn't get any results . I have date/time field in custom object with a value "2004/10/13 12:00 AM" - that's what I see using view in UI. Timezone settings is "GMT-05:00 New York/America". Here is my query which I use to get object ID:
string queryString = "SELECT Id FROM Volume__c WHERE Trade_Date__c=2004-10-13T00:00:00Z". It doesn't return any record. When I specify timezone:
string queryString = "SELECT Id FROM Volume__c WHERE Trade_Date__c=2004-10-13T00:00:00-05:00Z" this query doesn't return any values.
Only when I changed time part of query (than it looks like "SELECT Id FROM Volume__c WHERE Trade_Date__c=2004-10-13T04:00:00Z"), it return my record. I can't got logic of this action - if I have GMT-05:00 then why should I specify 04:00:00 in time part of the query???
And may be there are some useful advices about how to handle such a fields???
Message Edited by cmxint on 11-30-2004 06:24 AM
Hi SimonF!
Thanks for both of your comments - they are really helpful! By the way - does sForce going to have some features to ease TZ handling?