• DATEDIFF(dd, 0, [smalldatetime column]) + 1

    _____________
    Code for TallyGenerator