Get current date in dd/mm/yyyy format in asp.net

Introduction: In previous articles i explained how to Encrypt and Decrypt connectionString in web.config file using code in asp.net  and   How to Encrypt Query String in asp.net(C#, VB) | Encrypting and Decrypting Query String in asp.net(C#, VB) and  How to read mac address using asp.net? and How to fill DropDownList from Sql server database in asp.net and How to find TextBox, DropDownList or other controls in Gridview in asp.net

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

Previous
Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..