DateTime Example

Rajesh_Kumar
Posted by Rajesh_Kumar under C# category on | Points: 40 | Views : 545
DateTime dt = new DateTime(2014,1,19);
Response.Write(dt);

Output:
19-01-2014 00:00:00

//Now Get only Date Not Time
Response.Write(dt.ToString("dd/MMM/yyyy"));

Output:
19-Jan-2014

Comments or Responses

Login to post response