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 7068081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:16:49+00:00 2026-05-28T05:16:49+00:00

I have an Excel sheet and have this formula below. I would like to

  • 0

I have an Excel sheet and have this formula below. I would like to calculate the same formula with sql. The result will be in second.

Thank you,

declare @t1 AS datetime
declare @t2 AS datetime
declare @t3 AS datetime
declare @t4 AS datetime

set @t1 = '2011-11-04 00:00:00.000' --start date
set @t2 = '2012-01-16 18:21:55.000' --start time
set @t3 = '2011-11-10 00:00:00.000' --end date
set @t4 = '2012-01-16 12:10:00.000' --end time

Excel formula

((end date-start date-1)+(end time-(0,375)))*24*60*60

0,375 value means 9 hour

formula result will be = 443400 second

  • 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-28T05:16:50+00:00Added an answer on May 28, 2026 at 5:16 am

    You mention that you not using Start Time in your formula?

    Here it comes:

    declare @t1 AS datetime
    declare @t2 AS datetime
    declare @t3 AS datetime
    declare @t4 AS datetime
    
    set @t1 = '2011-11-04 00:00:00.000' --start date
    set @t2 = '2012-01-16 18:21:55.000' --start time
    set @t3 = '2011-11-10 00:00:00.000' --end date
    set @t4 = '2012-01-16 12:10:00.000' --end time
    
    SELECT CAST((DATEDIFF(d, @t1, @t3)-1 + (CAST(@t4 AS FLOAT) - FLOOR(CAST(@t4 AS FLOAT)) - 0.375))*24*60*60 AS INT)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel sheet and have this formula below. I would like to
I have the this code that will create excel file and work sheet then
For every week I have excel sheet converted to SQL database this excel sheet
I have this sheet on Excel : Team Total Points Position AJPPR 371,1878896 APP64
In a cell in Excel sheet I have a Date value like: 01/01/2010 14:30:00
I would like to know how to create a hyperlink from one excel sheet
This is starting to really annoy me! I have an Excel sheet with a
I have this forumula in a Excel sheet : =IF(B$3=0,B$14*B$2*B$6,(1-((1+B$3))^B$6)/LN(1/(1+B$3))*B12*B$2) where cells: B2 =
In excel 2007, I have a formula in a cell like the following: =COUNTIFS('2008-10-31'!$C:$C;>=&'$A7)
I have an excel sheet, where cells A1-C20= =INT(RAND()*10) . This is my data

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.