Export Project and Change the Duration Cause the Finish date error RRS feed

  • Question

  • I use VB.NET to create a MS Project Instance and use this Instance to add task, and set task's Name, Start and Finish, the Project file is created successfully, and the Duration value will be automatically generated by Project, but if I change the Duration value in Project, the Finish date isn't correct, for example, if I set the the Start is "10/21/2014" and Finish is "10/31/2014", the generated Project file has a Duration value is "9 days", and if I change the Duration value to "2 days", the Finish date will be changed to "10/21/2014", why this problem happen? I have no idea about this problem.
    Monday, January 13, 2014 9:08 AM

All replies

  • when you set Start is "10/21/2014" and Finish is "10/31/2014", the generated Project file has a Duration value is "9 days" because it is taking Saturday and sunday as non working days.

    By default in Project server calendar both Saturday and Sunday are non workng days. If you want to make these day as working day you have to configure the calendar once you will do it then it will display duration value as 11.

    When you change the value then after changing value click on Calculate button so that project server can calculate value correctly it is not required to click on Calculate all the time but some time project server takes time to reflect the chnages but if you will publish the project it will calculate correctly and display proper finish date ( I change the Duration value to "2 days", the Finish date will be changed to "10/21/2014 as 10/23/2014)


    Monday, January 13, 2014 11:56 AM
  • Hi Derek,

    In addition to the excellent answer provided by Kirteshtiw, I'd add that you have to take care about the constraints.

    Everytime you specify a start date or a finish date, MS Project will create a constraint in the task that might trigger an unexpected behavior. For instance in your example:

    • you set a start date, thus it will create a "start no earlier than" constraint,
    • then you set a finish date, creating a new constraint "finish no earlier than" that will actually OVERWRITE the previous constraint.

    Meaning that when you'll change to reduce the duration, the finish date will be kept as it is whereas the start date will be recalculated.

    Hope it makes it clearer. In addition, here is an intersting article about task constraints:

    Hope this helps.

    Guillaume Rouyre - MBA, MCP, MCTS

    Monday, January 13, 2014 1:39 PM
  • Thank you.

    The "9 days" for Start "10/21/2014" and Finish is "10/31/2014" is correct, but if I set the Duration to "2 days", I hope the Finish is changed to "10/22/2014", but now it is "10/21/2014", I don't know how to fix this problem.

    And in this generated Project file, if I manually add a task, set Start to "10/21/2014", then set the Duration value, the Finish is changed to "10/22/2014", it is correct, but the VB.NET generated task still is wrong.
    Tuesday, January 14, 2014 5:22 AM
  • Derek, 

    I can only help you in Project server, Ms project professional related problem.

    If you are telling us about PSI,

    I can only suggest you if you are using any coding to generate Task in project file please check your code. 


    Tuesday, January 14, 2014 6:16 AM
  • Hi,

    After applying the duration through VB.Net, what exactly does the duration field show?

    Which type of task is generated? Manually scheduled or automatically scheduled?

    If manually schedules, what do you see in the Scheduled Duration and the Scheduled Finish fields?


    Tuesday, January 14, 2014 9:00 AM
  • Thank you all, I already resolve this problem, the reason is when set Start and Finish date, include the time fields, the assigned variable is date type, if use string type, and the value just include the date fields, then this problem gone.
    Thursday, April 3, 2014 3:58 AM