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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:40:26+00:00 2026-06-12T21:40:26+00:00

I have a conversion method to accomplish converting a datediff() to dd:hh but i

  • 0

I have a conversion method to accomplish converting a datediff() to dd:hh but i am also trying to add some additional calculations into it which is causing an arithmetic overflow error converting numeric to varchar.

im not looking for anyone to solve my arithmetic issue, just looking for alternate conversion methods that i can try out and test for myself, if this is pointless please tell me as well, not sure if a different method will change anything.

here is the current method:

-- resulting in Days
convert(varchar(10), (datediff(second, startdate, enddate)/86400)+':'+ 
-- resulting in hours
convert(varhcar(10), (datediff(second, startdate, enddate)%86400/3600)) as 'DD:HH'

does anyone have anything else that will accomplish the same goal?

maybe a better way to ask is there a way to limit the arithmetic performed in this to return a shorter integer so that i can work towards avoiding the overflow error?

  • 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-12T21:40:28+00:00Added an answer on June 12, 2026 at 9:40 pm

    thanks to @rahultripathi for this link for datetime conversions in SQL, gave me what i needed.

    Click Here for Link

    will update answer with more info ASAP, havent figure everything out yet, if someone has a better answer, I will accept it

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

Sidebar

Related Questions

I could use some help with expression conversion. I have a method on a
I have a simple regex conversion method that I use to do some minor
I have a small data conversion application that converts xml into a json then
I have a templated class Rect with conversion constructor which allows conversion between Rect
I have to create a regular expression for some path conversion. Example for path
I have used many of the Convert.To..... functions for conversion , but I didn't
I ran into an issue when using the GetDataTable() method. I'm trying to return
I have a method which builds lists of lists. I'd like to have the
I have been trying out the new Spring MVC 3.0 Type Conversion Framework. I
I have a string in PHP (came from some data source), which represents a

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.