Click here to Skip to main content
15,892,537 members

Dividing the time in equal intervals

Sumal.V asked:

Open original thread
In a line graph I plot certain values against time programatically(Macro)for a survey.

The number of hours in a survey are not same always. In order to divide the x-axis (time) in equal intervals,

Eg: The time is starts from 00:00:00 to 19:00:00.
     TotalTime = FinalTime - InitialTime
     TotalTime =  19:00:00 - 00:00:00
     TotalTime = 19:00:00 

But in a new data set I got, the survey runs for 2 / 3 days continuously.
So now to check the total number of hours, when the final and initial values are subtracted, the resulting value is only few hours.

ex:
Start Time = 01:00:00(Day1), End Time = 07:00:00(Day2)
The result is 06:00:00 
but this is incorrect

Need some suggestions please
Tags: C++, Microsoft Excel, General

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900