
Working with timestamp literals in the Infosphere SFDC Connector soql is much like working date literals. So, here a quick example which may save you some time.
SOQL Timestamp String Literals Where Clause Rules
Basically, the timestamp pattern is straight forward and like the process for dates, but there are some differences. The basic rules are for a soql where clause:
- No quotes
- No functions
- No Casting function, or casting for the where soql where clause to read it
- It only applies to datetime fields
- A Timestamp identifier ‘T’
- And the ISO 1806 time notations
Example SOQL Timestamp String Literals
So, here are a couple of timestamp string literal examples in SQL:
- 1901-01-01T00:00:00-00:00
- 2016-01-31T00:00:00-00:00
- 9999-10-31T00:00:00-00:00
Example SQL with Timestamp String Literal Where Clause
Select e.Id,
e.AccountId,
e.StartDateTime
From Event e
WHERE e.StartDateTime > 2014-10-31T00:00:00-00:00
Related References
- SFDC – Using a date literal in a where clause
- SFDC Salesforce Connector – Column Returns Null values, when SOQL Returns Data in Workbench
- Salesforce – Useful Links
Salesforce Developer Documentation
Home, Developer Documentation, Force.com SOQL and SOSL Reference
Salesforce Workbench
Home, Technical Library, Workbench
W3C
Date Time Formats