• or is it what you are looking for?

    select cast(getdate() as int)

    /*

    39717

    */

    select cast(39717 as datetime)

    /*

    2008-09-28 00:00:00.000

    */

    .