0

I'm using mpxj 4.5 to export my projects. When I open .mpx file by MsProject it shows me incorrect task duration hours.

If i set 0 hour, msproject shows me 5 hours. But it is working fine with DAYS(if i set 24 hours, getting 1 day). What is the problem with hours, I'm only dividing by 24 to get days.

I use this code:

double hours = 0.0 //in my project some tasks has 0 hours duration.
task.setDuration(hours >= 24 ? Duration.getInstance(hours / 24, TimeUnit.DAYS) : Duration.getInstance(hours, TimeUnit.HOURS));

Please help... how can i get task duration hours correctly.

hurshid
  • 66
  • 1
  • 2
  • 5

1 Answers1

0

I had the same problem. It worked when I set the duration, work, remaining duration and remaining work.

I hope it helps you.

Chocksmith
  • 1,188
  • 2
  • 12
  • 40