• The first one has a little problem.

    DECLARE @dt DATETIME = '2014-04-09 23:59:59.000';

    ...