There are two date fields on an Object say Date1 & Date2, Now I want to Write a SOQL Query in SOQL Editor to fetch all the Object records where Date 2 is Greater than Date 1. how you will do this using SOQL only?
Best way is we can create a Boolean/checkbox formula field on that objects which has below condition Date2_c > Date1_c
Then query the records where this formula field is true i.e
SELECT Date1,date2 FROM object WHERE Date2_c >Date1_c