• This thread might be helpful: Query for Continuous Period.