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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:26:41+00:00 2026-06-02T18:26:41+00:00

I need to create a column that will store hours bigger than 24. For

  • 0

I need to create a column that will store hours bigger than 24. For example '25:00:00', '129:23:12', etc).

That column will be used to perform calculations between datetime intervals: ‘time’.

I was trying

SELECT  CAST((CAST(CAST(RIGHT('107:37', 6) as datetime) AS FLOAT))/(207.160) AS DATETIME)

if it

below '23:59' instead of '107:37' working fine.

'107:37' give error:

The conversion of a char data type to a datetime data type resulted in
an out-of-range datetime value.

  • 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-02T18:26:43+00:00Added an answer on June 2, 2026 at 6:26 pm

    Just store the value as a datetime data type. You can do mathematical calculations on datetime data types, such as +, -, SUM, MIN, MAX, etc, and you can use DateDiff and DateAdd as well. The only tricky bit you’re going to have is in displaying the value as HHHH:mm:ss. You can do that easily enough, though:

    DECLARE @datetime DATETIME
    SET @datetime = 4.2
    SELECT CAST((FLOOR(CAST(@datetime AS FLOAT)) * 24) + DatePart(Hour, @datetime) AS VARCHAR) + 
        ':' + CAST(DatePart(Minute, @datetime) AS VARCHAR)
        + ':' + CAST(DatePart(Second, @datetime) AS VARCHAR)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a macro that will create a column called Store. Then, the macro
I need to create a report using SQL Server 2008R2 Stored procedure that will
I need to bind width property of the GridView column that is created dynamically
I need to create some xaml that shows text in columns like newspaper, something
I need to create a table with this structure: Column A Column B Column
I need to store a large table (several millions or rows) that contains a
I need to store data related to items where there will be various different
I have a query that will need to run 28 000 times in a
I'm making a graph-related program so I need to dynamically create/remove columns from a
I need to create an array, in which first two columns are filled from

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.