C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Calendar Date Format


Posted Date: 01 Jan 2009      Posted By: juhee      Member Level: Gold     Points: 1   Responses: 2



HI

How to change the format of date from Calendar control..the date format it is showing is mm-dd-yyyy..i want it in dd-mm-yy





Responses

Author: Gaurav Agrawal    01 Jan 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

datetime dt=new datetime();
dt=datetime.now;
string date = dt.tostring("dd-MM-yyyy");

it returns date in this(dd-MM-yyyy) format
and the another option is use globalization.cultureinfo for set datetime formats...

GA

Thanks & Regards,

Gaurav Agrawal
Sr.Software Engineer
gaur1982@yahoo.com
09829373514



Author: Parul Rathore    01 Jan 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

see... Assign following value in textbox control-
txtDate.Text=Calendar1.SelectedDate.TosTring("dd/MM/yy");



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Library Management System(Urgent)
Previous : Using Asp.net how to invoke Onscreen keyboard(osk.exe)and set the language
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use