About 51 results
Open links in new tab
  1. What is the best way to calculate a time span? [closed]

    In my c# program, my requirement is to calculate a timespan for business logic execution that is inside a foreach loop I have to store time span. I am using following code for (int i = 0; i &lt...

  2. Calculation with DateTime and TimeSpan in C# - Stack Overflow

    May 12, 2017 · You save valuers as DateTime, but calculations result in TimeSpan s, as the names suggest. Why do you keep the time as string, just leave it DateTime instead of converting all the time?

  3. Time span calculation for hours and minutes in C# - Stack Overflow

    Nov 11, 2010 · The final result should display the user the time span between the start hour and the end hour.(e.g. start work at 06:30 AM and finished at 18:30 PM, the result to display should be 12 hours). …

  4. Get time difference between two timespan in vb.net

    Dim span3 As TimeSpan = starttime .Subtract(endtime ) Now I am getting span3 : 08:00:00 This is wrong answer. Actually I want to get 16:00:00. (this is the exact differnce between 2.30Am To 10.30 …

  5. How can I calculate a time span in Java and format the output?

    The java.time classes use these formats by default when parsing & generating strings. For a span of time unattached to the timeline, the standard defines a format of PnYnMnDTnHnMnS where P marks …

  6. Getting time span between two times in C#? - Stack Overflow

    Getting time span between two times in C#? Asked 13 years, 4 months ago Modified 3 years, 4 months ago Viewed 242k times

  7. datetime - Calculate time span in Python - Stack Overflow

    im using Python v2.x on Windows 64bit I would like to record two moments in real time and calculate the time span. Please see code as following: current_time1 = datetime.datetime.now ().time () # f...

  8. How to calculate a time difference in C++ - Stack Overflow

    Apr 8, 2009 · What's the best way to calculate a time difference in C++? I'm timing the execution speed of a program, so I'm interested in milliseconds. Better yet, seconds.milliseconds.. The accepted …

  9. Calculating timespan with t-sql - Stack Overflow

    Apr 15, 2009 · I can see how DATEDIFF might work but it always returns TOTAL time. I can get total days or total hours but I can't get the span 1day 9hours. At least not in a straight forward way. …

  10. Days, hours, minutes, seconds between two dates - Stack Overflow

    May 10, 2012 · I have two dates, one less than the other. I want to create a string such as this one "0 days, 0 hours, 23 minutes, 18 seconds" representing the difference between the two dates. How can …