Extracting only date from Sqlserver Excluding time

Posted by Self-innovator under ASP.NET on 12/30/2011 | Points: 10 | Views : 797 | Status : [Member] | Replies : 1
Hi friends pls find soln..
I want to retrieve only date and to disp in my asp app from stored datetime in my databsae sql server ...
whan i make use of this query
select CONVERT(varchar(10),getdate(),111)

retrieves current date not the stored date of db..

Join Hands Change lives
Thanks & Regards
Straight Edge Society



Responses

Posted by: Prabhakar on: 12/30/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
hello


Try this . .


select CONVERT(varchar(8), OrderDate, 112) as OrderDateOnly


Best Regard's
Prabhakar

Self-innovator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response