Home  »  Code Snippets  »  SQL Server  »

Get only date part form Datetime field of SQL Server

 Posted By : Manoranjan SahooPosted Date : 20/07/2011 02:17:02 PM Category : SQL Server Points : 2

Sometimes we need to fetch only Date part from our DateTime field of our SQL Server database.

use below code to get :

SELECT CONVERT(VARCHAR(10),GETDATE(),105)

here you will get the result set of current date as below :

20-07-2011

 

 

Responses
No responses found for this thread. Be the first to respond this thread.
Post Reply
Login to post Response.