Are you looking for mathematical difference or date difference? Because -329 is the number of days difference between the two dates and 9807 is the mathematical difference. These two calculations are very different from each other.
I can say it as my blunder mistake. I have take the date format values to excel sheet and converted into it number format values (which QlikView is doing). After performing the conversion and calculating the values gives the correct result.