Hi Maria,
Yes, it can be done. You just need to convert the dates into a number and then compare both numbers. If the date of visit (number) is greater than the previous date of visit (number) then you can display an error.
Here is a simple example: https://acrobat.com/#d=7PUFBNqH7BvNJpihaI2JFw It can be extended to clear the data, so that the user has to reselect the dates.
Good luck,
Niall