Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6939203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:35:31+00:00 2026-05-27T12:35:31+00:00

I am looking to calculate the minutes spent performing a task that is within

  • 0

I am looking to calculate the minutes spent performing a task that is within a specific time window.

I have the two input parameters defining the time window @WindowStart and @WindowEnd and i have [Task Start] and [Task End] columns in my task table.

What would be the easiest way to calculate the time spent on a task that is within my time window? Tasks can easily begin or end after @WindowStart and @WindowEnd.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:35:32+00:00Added an answer on May 27, 2026 at 12:35 pm

    If what you want is to find the length of tasks are entirely contained in the window:

    select [task end] - [task start] as taskDuration
    from tasktable
    where [task start] > @WindowStart and [task end] < @WindowEnd
    

    If instead you want to look at durations that have any overlap with the window, just flip the and to an or.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking everywhere for a snippet of code that will calculate the
I'm looking for a way to calculate differences between integers within a single table.
I am looking to calculate the indefinite integral of an equation. I have data
I'm looking for a Java library that is capable of performing spatial calculations on
Looking for the quickest way to calculate a point that lies on a line
I am looking to calculate how many times people have viewed my users profiles
I am looking for a good library (preferably in C/C++) that can calculate the
I'm looking to calculate the number of months between 2 date time fields. Is
I was looking for a helper function to calculate the intersection of two lines
I'm looking for a simple way to calculate the difference between two rectangles. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.