Hi,
I have 3 attributes of type "Timestamp" (StartTime, EndTime, PauzeTime)
To calculate the total time I do this:
Work.TotalTIme=Work.EndTime-Work.Starttime /// This works with two times to substract
Work.TotalTIme=Work.EndTime-Work.Starttime-Work.PauzeTime ///This does NOT work. The error is:
com.bas.shared.ruleparser.ParseException Operands in expression Work.Endtime-Work.Starttime-Work.PauzeTime are of incompatible types.
But the attributes are exactly the same (I've checked this). All combinations do work as long as I substract only 2 of these attributes.
When I use 3, I get this error.
Is there a way to substract 3 time attributes???
Substracting 3 time attributes
Substracting 3 time attributes
Using 8.7 Professional 3025 on MySQL/Windows
Re: Substracting 3 time attributes
I am just guessing, but here is what I think is causing your error.
Subtracting a TimeStamp from a TimeStamp (Work.EndTime - Work.Starttime) gives you a Duration. Subtracting your third TimeStamp (Work.PauzeTime) from the Duration gives you your error.
What does PauzeTime represent? A point in time (TimeStamp) the work was paused or the length of time (Duration) that the work was paused.
What attribute type is Work.TotalTime? Looks to me it should be a Duration.
Subtracting a TimeStamp from a TimeStamp (Work.EndTime - Work.Starttime) gives you a Duration. Subtracting your third TimeStamp (Work.PauzeTime) from the Duration gives you your error.
What does PauzeTime represent? A point in time (TimeStamp) the work was paused or the length of time (Duration) that the work was paused.
What attribute type is Work.TotalTime? Looks to me it should be a Duration.
Bob
Re: Substracting 3 time attributes
You are right. I changed it to Duration attributes and changed the processes and now it works fine! Tnx!
Using 8.7 Professional 3025 on MySQL/Windows