SQL Query Get Date Only For The Date Part

Here’s some example to get the date part in sql with datetime data type :

1
DATEADD(dd, 0, DATEDIFF(dd, 0, [yourdate]))

or

1
CONVERT(date, [yourdate])

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.