Only Date NO Time

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 199
1ST Way:-
SELECT CONVERT (DATE, GETDATE()) AS 'yyyy-MM-dd format'

2ND Way:-
SELECT FORMAT(GETDATE(),'yyyy-MM-dd') AS 'yyyy-MM-dd format'

Output:-
2014-12-29

Comments or Responses

Login to post response