
1. Re: Working day calculation, value 10 if start and end date is the same
philmodjunk Mar 10, 2011 1:29 PM (in response to FlorianWiegand)And what is the calculation?

2. Re: Working day calculation, value 10 if start and end date is the same
FlorianWiegand Mar 11, 2011 12:43 AM (in response to FlorianWiegand)Hello Phil,
this is my calculation:
If ( not ( IsEmpty ( UAT Date )) ; 5 * Int ( ( UAT Date  UAT Starting Date ) / 7 ) +Middle ( "0012345501234544012343340123223491111234010012340" ; 7 * (DayOfWeek ( UAT Starting Date )  1 ) + DayOfWeek ( UAT Date ) ; 1)+1)
Thank you
Florian

3. Re: Working day calculation, value 10 if start and end date is the same
philmodjunk Mar 11, 2011 9:16 AM (in response to FlorianWiegand)Are you trying to compute the number of elapsed days from UAT Starting Date to UAT Date? Are both of these fields of type date?
If so, just use
UAT Date  UAT Starting Date
and you will get the number of days.

4. Re: Working day calculation, value 10 if start and end date is the same
FlorianWiegand Mar 16, 2011 7:00 AM (in response to FlorianWiegand)Thank you for your post.
My calculation does the average working days:
"If (IsEmpty (( UAT Date ) ) ; 5 * Int ( ( Get(CurrentDate)  UAT Starting Date ) / 7 ) +Middle ( "0012345501234544012343340123223491111234010012340" ; 7 * (DayOfWeek ( UAT Starting Date )  1 ) + DayOfWeek ( Get(CurrentDate) ) ; 1 ) +1)"
I resolved the issue with the number 10. But the fields only get calculated when i add the date. But the field does not recalculate every day. For example the start date is 01.01.2011 and the end date is 01.03.2011. I expect the result is 3 including the start date. But when i look at the calculation one day later, the number remains 3 unless i reenter the starting date. Then it displays 4. How can i ensure that this is done automatically every day?
Thanks

5. Re: Working day calculation, value 10 if start and end date is the same
raybaudi Mar 16, 2011 8:17 AM (in response to FlorianWiegand)Hi
when a calculation gets a value from a Get( ) function, most of times it needs to be an UNSTORED calculation.
( Look at "storage options..." on the bottom right of the calc window )

6. Re: Working day calculation, value 10 if start and end date is the same
FlorianWiegand Mar 16, 2011 8:39 AM (in response to FlorianWiegand)Thank you very much, in my test scenarios this has proved to be the solution. !! :)