Get the Date Part of a Date/Time Value.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 166
Write below query,it will show only date no time.
SELECT CAST(FLOOR(CAST(GETDATE() AS FLOAT)) AS DATETIME) AS 'Date Part';

OUTPUT
2015-04-07 00:00:00.000

Comments or Responses

Login to post response