Click here to Skip to main content
15,921,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Convert Date 03-Sep-12 To 2012-03-09 in csharp

C#
DateTime date = Convert.ToDateTime(txtFromDate.Text.ToString());


This date Value is 03-Sep-12 .but i need 2012-03-09

pls help me quick
Posted
Updated 12-Nov-12 23:26pm
v4
Comments
Andy411 13-Nov-12 5:55am    
Do you have problems parsing the string as a date? Or do you have problems to format it for output as a string?

 
Share this answer
 
CultureInfo sg = new CultureInfo("en-SG");

DateTime date = Convert.ToDateTime(txtFromDate.Text.ToString(),sg);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900