TRUNC (date)

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
*/
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.