1
Answer

Date Time Convertion in C# into DD-MMM-YYYY Format

Bineesh  VP

Bineesh VP

10y
7.2k
1
Sir,
 
 
I want to convert a datetime value from database into DD-MMM-YYYY format in c#.
 
In SQL SP, I coded as :
 
(CONVERT(VARCHAR(20),A0505.BKDATE,105)) AS DATE
 
In this code, I getting the result as I intended.
 
And in C# code :-
 
bookingDate =Convert.ToDateTime(rdr["DATE"].ToString())
 
In this code, the result is  ' DD-MMM-YYYY : 12:00:00 AM'. How can set this code into 'DD-MMM-YYY'
 
 
Answers (1)