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