Data comparition

There exist a plugin (or you can give me an example) witch compare data-stamp from 1 row with 2nd row and can generate a message if the differences are more than 10min ? And, of course, I need a message if the differences are under the 10min.

I want to compare data from 2 fields, like a contact form style.