ASP.NET - how to remove time part from date column in sql 2008

Asked By bhanupratap singh on 25-Sep-12 05:46 AM
I have date column in sql 2008. When I retrive data from table it display datetime both. I need to remove time from this column in dd/MM/yyyy formate
column type is date.

Like:-- txtDate.TExt=25/09/2012.


Robbe Morris replied to bhanupratap singh on 25-Sep-12 01:27 PM
DATEPART or do it in your .NET code as dateTime.ToString("MM/dd/yyyy");
Jitendra Faye replied to bhanupratap singh on 26-Sep-12 01:52 AM
Use DateTime.ToShortDateString() method it will give only date.
Rajat replied to bhanupratap singh on 26-Sep-12 10:27 AM
Pls  take a look at his
http://msdn.microsoft.com/en-us/library/ms187928.aspx