Get Date from Datetime SQL
There is two way to get Date from Datetime in SQL server:
1. CAST function
CAST : convert from one data type to another.
Syntax : CAST(expression AS data_type)
Example:
SELECT CAST(datetime_column AS DATE) FROM table_name;
2. CONVERT function
CONVERT: converts a value from one data type to another.
Syntax: CONVERT(data_type, expression)
Example:
SELECT CONVERT(DATE, datetime_column) FROM table_name;