- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
05-18-2007 11:33 AM
Select e.ActivityDate, e.ActivityDateTime, e.Id, e.Subject from Event eToday is 05/18/2007
Where e.OwnerId = '<myId>' AND e.ActivityDate = TODAY
The statement does not return events where ActivityDate is 05/18/2007. Instead in returns events where ActivityDate is 05/19/2007.
When I filter by a Datetime field (Event.ActivityDatetime) this does not occur and correct records are returned.
For now, I just simply modified my SOQL to use YESTERDAY instead of TODAY. But I would like to know the reason for this behavior. Am I missing something here or this could be an issue?
05-23-2007 09:11 PM
~ sfdcfox ~
05-24-2007 03:34 PM - edited 05-24-2007 03:34 PM
The problem occurs when I query Date fields (not Datetime). So, it appears that Date fields are not offset by the user settings as Datetime fields are... Instead they are returned always in GMT. To me this seems inconsistent...
Message Edited by AndreyVol on 05-24-2007 06:35 PM