Created
September 5, 2019 23:14
-
-
Save shinchit/6f7572cdede33a2e9cabc0ecec4eb7de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String soql = 'SELECT Id, Name FROM Opportunity' | |
+= ' WHERE' | |
+= ' DAY_ONLY(convertTimeZone(CreatedDate)) >= ' + String.valueOf(fiscalLastYearStartDate) | |
+= ' AND' | |
+= ' DAY_ONLY(convertTimeZone(CreatedDate)) <= ' + String.valueOf(fiscalLastYearEndDate); | |
List<Opportunity> opportunities = Database.query(soql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment