Related Posts Plugin for WordPress, Blogger...

About

Follow Us

Monday, 2 February 2015

In this article i have explained how to get current date in dd/mm/yyyy format in asp.net.

C#.Net code to get current date in dd/mm/yyyy format in asp.net

write the below code on button click or as per your requirement
string curr_Date = null;
curr_Date = System.DateTime.Today.ToString("dd-MMM-yyyy");
Response.Write(curr_Date);
Result will be like: 21-Feb-2013

VB.Net code to get current date in dd/mm/yyyy format in asp.net

write the below code on button click or as per your requirement
Dim curr_Date As String = Nothing
curr_Date = System.DateTime.Today.ToString("dd-MMM-yyyy")
Response.Write(curr_Date)

Result will be like : 21-Feb-2013

0 comments:

Post a Comment