function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
arishi0arishi0 

Compare two datetimes to validate if they are same (to the minute)

Hello,

 

I have to make a comparison in an if statement that takes two date time field values (Say , createdDate and LastModifiedDate) from two different records. These are values from Historical tables taht track field changes so in essence I am trying to see if tw ofield changes on these two records were made in the same minute.

 

So need a way to take these two date times from these records and see if they have been edited/created within the same minute. 

 

May be an easy fix but I cannot find anything in DateTime documentation.

 

Thank You.!

nnewbold-sfdcnnewbold-sfdc