Fix calculate for date difference