Skip to main content
1 of 2
Ayush Goyal
  • 455
  • 1
  • 6
  • 20

Is SystemModStamp field comparable to variables of DateTime data type in SOQL statements?

I have a field on a custom setting which is of the type DateTime. I have a business requirement where I need to use this value in conditional SOQL of one SObject.

If I try to use Select Id, myField__c FROM MySampleObject__c WHERE SystemModStamp > myDateTimeValue , the SOQL statement throws compile time error.

Is it some data type issue or is it not comparable variables?

Ayush Goyal
  • 455
  • 1
  • 6
  • 20