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 TruncDateOnly
6/3/2016 9:42 AM 6/3/2016
*/
Comments
Please sign in to leave a comment.