Convert Datetime to Date | SQL Server CONVERT(datetime to date)

SQL Server CONVERT(datetime to date)

 

 In this article, you will learn how to convert a datetime to a DATE by using the CONVERT()

 

CONVERT(DATE, Datetime_Expression)

 

SELECT 
    CONVERT(DATE, GETDATE()) date;

 

select convert(varchar, ExpiryDate,23) as ExpiryDate

2021-10-03