Import MPP file error

Dates parsed by DHTMLX gantt don’t seem to be correct compared to the original MPP file which has been exported from Microsoft Project. Is MPP the preferred file type or is XML better? Can you please check and advise? Thanks

C14189 - 6.1 - Cl 31 Rev 4b.mpp (388 KB)

Hello Richard,
When you import MSP files, the tasks in the JSON data have only the start_date and duration properties. So, Gantt needs to calculate the end_date parameter.

In DHTMLX Gantt, the task duration and end date depend on the Gantt configuration. For example, when the work_time config is enabled, Gantt skips the weekends when calculating the duration. But by default, they are not skipped:

Also, it seems that you use the “hour” duration unit in your file, though it doesn’t reflect that. So, you will need to set the duration_unit config to hour:

As that will make the tasks end earlier (for example, they will have the duration of 3 hours instead of 3 days), you will need to set the end_date parameter as it has a higher priority over the duration parameter. You can obtain it from the Finish parameter in the $raw object of the imported data:{
  task.end_date = task.$raw.Finish

After that, you will see the duration in hours. To see it in days, you need to use the formatter:

Here is the snippet with all that configuration: