Extract only Date from store Date time in SQL

Self-Innovator
Posted by Self-Innovator under Sql Server category on | Points: 40 | Views : 1096
Extracting only date from stored Datetime value in Db.

SELECT CONVERT(VARCHAR(14),[DOB],101) AS 'DATE OF BIRTH'  from EMP

Comments or Responses

Posted by: Kundan64 on: 1/11/2013 Level:Starter | Status: [Member] | Points: 10
From SQLServer 2008 onwards we can use also:

SELECT CAST(GetDate() as DATE) AS 'Date'

Login to post response