I thought about providing some sample code for a set based solution, too. But since I couldn't find any place in the code where the OP used the variable @entrydateconv (other than to assign it) I decided to leave it with the verbal comment until there is more information...
Proves at least one thing: A saint is a saint. And I am not... 😉