I have a report that requires subtracking the current time from when the shift started. (i.e current time 11:00:00am - shift started at 07:00:00) the value should be 3:00:00. Is there a way to obtain the total hours/minutes/sec??
I created three formula's. One is datetime1, it is (currenttime); another is datetime2, it is (Time (07,00 ,00 ) to represent the beginning of the shift; the third formula is current run time, it is (datediff("s",datetime1,datetime2). But at this third formula an error message is displayed...A number, currency amount, bolean, date, time, datetime, or string is expected here.....
I must be missing the obvious - my programming skills are light.
When someone asks for the actual formulas, copy and paste the actual formulas, it means that they don't want to hear a description of them, they want to see the ACTUAL formulas.
You seem to have overlooked Madawcs reference to my FAQ (link in his post) to do what you wanted, so clikc the following link:
I did include the formulas and have also reviewed FA767-3543. But I'm not tring to find the diff in hhmmss, I'm trying to find the diff in minutes only. The first two formulas are from crystal reports the third is to find the difference in mm.
shift start = time(07,00,00)
present time = currenttime
timediff = (datediff("s",present time,shift start)...This last formula is the one that will not work.
You have to include dates to use datediff. If your shifts can cross days, e.g., 11pm to 7am, then you definitely should add actual date fields. Otherwise, you can write the formula like this:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.