Moved hrCnt initialize prior to sorted date loop.