Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Calculate Hours Available/Hours Used (GetFreePeriod??) (Read 3235 times)
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Calculate Hours Available/Hours Used (GetFreePeriod??)
May 3rd, 2014 at 12:02am
Print Post  
Hi, I have written my own code to calculate the hours available/used based on items however, I am wanting to know if there is a more efficant way to do this?

Would the "GetFreePeriod" method work or is there another way?

Example is; I have 5 employees with work hours set between 0700hrs and 1600hrs with a 1hr break in the middle and therefore have 40hrs of availability.
I place a 2hr task into three employee's schedule so i now need to know how many hours are still available (34) and how many are planned (6). Thanks
  

Regards,
TRB
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Calculate Hours Available/Hours Used (GetFreePeriod??)
Reply #1 - May 3rd, 2014 at 11:40am
Print Post  
Hi,

Unfortunately you need to do this manually. The GetFreePeriod method only returns the start time of a free period with a specified duration, not its total length. Also it doesn't take into consideration work times and breaks. If you have the source code of the control, you may find the TimeRanges class useful for calculating the length of a time period.

Regards,
Meppy
  
Back to top
 
IP Logged
 
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Calculate Hours Available/Hours Used (GetFreePeriod??)
Reply #2 - May 3rd, 2014 at 12:35pm
Print Post  
Thanks Meppy.
  

Regards,
TRB
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint