WorkWeek Element

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Contains the elements that define an effective work week.

<WorkWeek>
  ComplexTypeValue
</WorkWeek>

Parent Elements

WorkWeeks

Child Elements

Element

Required / Optional

Description

TimePeriod

Optional

Defines a contiguous set of days in a work week.

Name

Optional

Name of the effective week

WeekDay

Optional

Defines days in the work week.

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

Caution noteCaution

In the releases of Project 2007 through SP1, the WorkWeek element is not closed when you save a project that has a work week with modified working times as XML. In addition, the modified WorkingTimes elements are not saved. If you try to open the XML file in Project, you get the error, "An unexpected problem occurred while opening the file. The file may be damaged." You can edit the XML file so that it is valid and opens normally. However, because Project 2007 does not correctly read the modified working times from the XML file, we recommend that you do not use Project XML files to save work week data until the errors are fixed in a later service pack.

To be able to open the XML file, you can edit the file and do the following:

  • Add the WorkWeeks name in the empty opening and closing elements for the WorkWeeks section.

  • Close all of the WeekDay elements by adding </WeekDay>.

  • Add the missing WorkingTimes sections with the FromTime and ToTime child elements.

Example

The following example shows the manually edited sections in bold font and with comments. The XML file opens in Project, so you can use other data, but the working times still show the default times.

<Calendar>
   <Calendars>
      . . .
      <WorkWeeks>       <!-- Add element name-->
         <WorkWeek>
            <TimePeriod>
               <FromDate>2007-11-26T00:00:00</FromDate>
               <ToDate>2007-11-26T23:59:00</ToDate>
            </TimePeriod>
            <Name>Training day</Name>
            <WeekDay>
               <DayType>2</DayType>
               <DayWorking>1</DayWorking>
               <WorkingTimes>   <!-- Add modified working times-->
                  <WorkingTime><FromTime>14:00:00</FromTime><ToTime>17:00:00</ToTime></WorkingTime></WorkingTimes></WeekDay>    <!-- Add closing element -->
         </WorkWeek>
      </WorkWeeks>   <!-- Add element name-->
   </Calendar>
</Calendars>

See Also

Concepts

Calendar Elements and XML Structure

XML Schema for the Calendars Element