Year issue when adding Rates to a resource

Last post 01-31-2012, 6:46 AM by seanwo. 1 replies.
Sort Posts: Previous Next
  •  01-31-2012, 5:34 AM 358313

    Year issue when adding Rates to a resource .NET

    Lets assume this is in my code:

    Rate opRate = new Rate();

    opRate.RateTable = RateType.A;

    opRate.StandardRate = 100;

    opRate.OvertimeRate = 0;

    opRate.StandardRateFormat = RateFormatType.Hour;

    opRate.CostPerUse = 0;

    opRate.RatesTo = new DateTime(2010,5,10);

    opRate.RatesFrom = new DateTime(2009,6,11)

    opResource.Rates.Add(opRate);

    in the output XML I get the following:

    Rates>
            <Rate>
              <RatesFrom>2000-06-11T00:00:00</RatesFrom>
              <RatesTo>2000-05-10T00:00:00</RatesTo>
              <RateTable>0</RateTable>
              <StandardRate>100</StandardRate>
              <StandardRateFormat>2</StandardRateFormat>
              <OvertimeRate>0</OvertimeRate>
              <OvertimeRateFormat>1</OvertimeRateFormat>
              <CostPerUse>0</CostPerUse>
            </Rate>

    Why is the year part of the date changing to 2000?

    Thanks in advance,

       Sean.

    EDIT: Infact this is happening to all dates in the project ie task start/finish etc

    I am guessing this is something I have set incorrectly... Any help would be appreciated.

     
  •  01-31-2012, 6:46 AM 358338 in reply to 358313

    Re: Year issue when adding Rates to a resource

    Whoops! I just checked the documentation and I need to apply the lic file (which I just recieved)

    Please feel free to destroy this post.

     

    Regards,

       Sean.

     
View as RSS news feed in XML