Removes the time part from a date. The example below shows a date column generated from the current server date and time (GETDATE) and the TRUNC'd VALUE.
Example:
SELECT GETDATE() as CurrentDateWithTimeStamp, TRUNC(GETDATE()) AS TruncDateOnly/* Returns the table CurrentDateWithTimeStamp TruncDateOnly6/3/2016 9:42 AM 6/3/2016*/

  • No labels