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

  • Home
  • SEARCH
  • 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 8547425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:15:49+00:00 2026-06-11T13:15:49+00:00

I have the following fields in a SQL Database: @EstimatedRequiredTimeHours DECIMAL(18,2) = NULL, @ScheduledStartDate

  • 0

I have the following fields in a SQL Database:

@EstimatedRequiredTimeHours DECIMAL(18,2) = NULL, 
@ScheduledStartDate SMALLDATETIME = NULL,
@ScheduledEndDate  SMALLDATETIME = NULL

I need to calculate the @ScheduledEndDate by adding the @EstimatedRequiredTimeHours to the @ScheduledStartDate.

I’m not entirely sure how to do this, DATEADD() doesn’t seem like exactly what I want and my SQL isn’t too up-to-date.

Any help would be appreciated.

Thanks.

  • 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-06-11T13:15:50+00:00Added an answer on June 11, 2026 at 1:15 pm

    Dateadd accept integers as second parameter, so fractions are truncated, in order to include them, just multiply with 60*60 and add seconds instead.

    set @ScheduledEndDate = dateadd(ss, @EstimatedRequiredTimeHours * 3600, @ScheduledStartDate)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table in a SQL database with the following fields: ID, Name,
I have an unusual SQL table (not mine) which has the following fields (among
I have a SQL table with following fields ID, Rly, Shed, Loco_no, shed, Date_failure,
I'm using CakePHP 2.1 I have following fields in database. id views max_views I
I have a database and have a Sql script to add some fields to
I have a database table named 'favoritecats' with the following fields: id catName catId
I have the following table in a SQL Server 2008 database with lots of
I have a SQL Server 2008 database with records like the following 001 CAT
I have these fields in my T-SQL database - startTime and endTime and processTime
I have following database schema for tabel tblpers Field Type Null Key Default Extra

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.