how to get datepart from a datetime in sql code example Example: sql datetime as date SELECT CONVERT(DATE, GETDATE()) date;