ASP.NET - how to use date funtion in stored procedure and asp.net c#

Asked By bhanupratap singh on 25-Sep-12 05:58 AM
how to use SELECT CONVERT(Varchar(12),GetDate(), 103) for dd/MM/yyyyy.

My table coloumn is postingDate datatype is date in sql 2008
I want to select record from table where postingdate='25/09/2012'
how to do 
thanks

Robbe Morris replied to bhanupratap singh on 25-Sep-12 09:25 AM
DATEPART
Jitendra Faye replied to bhanupratap singh on 26-Sep-12 01:51 AM
for this you can use different format while getting data from database.  like Robbe suggested use DatePart.
manish postariya replied to bhanupratap singh on 26-Sep-12 03:32 PM
myCommand.Parameters.Add("@dateRegistered", SqlDbType.Date);
myCommand
.Parameters["@dateRegistered"].Value = DateTime.Now.ToString("dd/mm/yyyy");