Changed to stored proc with date parameters