Home  /  Questions  /  Question



50   50
Apr 15, 2011


Web User Control and date formatting

I have a drop down list in a Web User Control and wish to show the date in dd mm yyyy format.
Could anyone explain what I need to do to get it to display like this?




50   50
Apr 19, 2011

in DropDownList add this property

10-02-2010    --------    DataTextFormatString = "{0:dd/MM/yy}"; 

10/02/2010    --------    DataTextFormatString = "{0:dd-MM-yy}";

 1 comment
 
thanx... sir... --- Dinesh Namdev  Apr 19, 2011

70   96.1
Apr 19, 2011

You can format dates and times in a number of ways. Take a look at the MSDN site:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

This will help you nicely
Ricky