change datetime to date code example
Example 1: sql datetime as date
SELECT
CONVERT(DATE, GETDATE()) date;
Example 2: convertir datetime a date
declare @fecha datetime
set @fecha = GETDATE()
select convert(date ,@fecha)
SELECT
CONVERT(DATE, GETDATE()) date;
declare @fecha datetime
set @fecha = GETDATE()
select convert(date ,@fecha)