Dofactory.com
Dofactory.com
 Back to list
Views:   10.9K
Replies:  2
Archived

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?

Dinesh Namdev, Apr 15, 2011
Reply 1

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

Ricky Owen, Apr 19, 2011
Reply 2

in DropDownList add this property

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

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

Aravind Kumar, Apr 19, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.