how to convert datetime to date in sql code example
Example 1: sql datetime as date
SELECT
CONVERT(DATE, GETDATE()) date;
Example 2: SQL Date Format
SELECT FORMAT(dbo.column, 'M/dd/yyyy')
Example 3: convertir datetime a date
declare @fecha datetime
set @fecha = GETDATE()
select convert(date ,@fecha)
Example 4: sql server format datetime to short date
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )