Solved

Time problem in CR8.5

Posted on 2002-06-27
12
390 Views
Last Modified: 2006-11-17
How to use time value bigger than 24 hours.
I want to add 30 hours with 50 hours = 80 hours(not 3 days and 8 hours);

Thanks,SD.

0
Comment
Question by:seb24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 100 total points
ID: 7114272
Use the datediff or dateadd function in a formula.

datediff("h",{date1},{date2}) will return the number of hours between the two datetime values specified.

dateadd("h",50,{date1}) will return the date and time 50 hours from the datetime value specified.

DRRYAN3
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
ID: 7114872
listening
0
 

Author Comment

by:seb24
ID: 7115793
I don't want to work with date, I want to work with time in hours only.
///////////////////////////////////////////////////////////
numbervar heures1 :=Sum ({@heure_1}, {Vue_Ressources_Engin.Mois});
numbervar minutes1 :=Sum ({@minute_1}, {Vue_Ressources_Engin.Mois});
numbervar minutes_en_plus1:=0;

if minutes1 > 59 THEN  minutes_en_plus1:= Int ( minutes1 / 60);
if minutes1 > 59 THEN minutes1 := minutes1 mod 60;

heures1:= heures1 + minutes_en_plus1;
Time (heures1,minutes1,0)  ;
//////////////////////////////////////////////////////////

How to do with "heures1" > 24 ?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 7116193
You will need to do something like

Time (heures1 mod 24,minutes1,0)  

mlmcc
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 7116962
If you want to work with time values which do not conform to the 24 hour clock, you cannot use the builtin date/time data types.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 7142381
Agree time is restricted to 24 hours then you get days.  Why not store the value as a number and simply work with it that way.

mlmcc
0
 
LVL 7

Expert Comment

by:mnye
ID: 9346945
This question has been classified abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.
 

Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

 
If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp 

mnye
EE Cleanup Volunteer
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9350918
Split  DrRyan & mlmcc
0
 
LVL 7

Expert Comment

by:mnye
ID: 9853943
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/No Refund, Split Points mlmcc/DrRyan

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

mnye
EE Cleanup Volunteer
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 9854030
OK
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9855044
Ok
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question