The totalMilliseconds() method returns the duration converted to milliseconds. Available since 2020.1.4172.
DayPilot.Duration.totalMilliseconds();
The duration converted to milliseconds.
var ms = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:15.100").totalMilliseconds(); // 390615100