#23765 change the Equals method to check if the type is either  date or datetime