MSSQL TODAY Function

DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)

roughly twice as efficient as:

CONVERT(DATETIME, CONVERT(varchar(10),@time, 120))

October 27, 2010 В· admin В· One Comment
Posted in: MSSQL

One Response

  1. Dan - January 24, 2011

    This also works:

    CONVERT(DATE, GETDATE())

Leave a Reply