Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

Time problem in CR8.5

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
seb24
Asked:
seb24
  • 5
  • 3
  • 2
  • +1
2 Solutions
 
DRRYAN3Commented:
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
 
mlmccCommented:
listening
0
 
seb24Author Commented:
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mlmccCommented:
You will need to do something like

Time (heures1 mod 24,minutes1,0)  

mlmcc
0
 
DRRYAN3Commented:
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
 
mlmccCommented:
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
 
mnyeCommented:
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
 
mlmccCommented:
Split  DrRyan & mlmcc
0
 
mnyeCommented:
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
 
DRRYAN3Commented:
OK
0
 
mlmccCommented:
Ok
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now