DEAR FRIENDS::
SOME TIMES IN C# CODING DEVELOPER WANTS TO CONVERT DATETIME FORMAT AS MM/DD/YYY, BUT SYSTEMS GIVES AN ERROR WHEN YOU INSERT 11/13/2011
IT GIVES AN ERROR
because datetime object default format is dd/mm/yyyy
and to convert datetime dd/mm/yyyy to mm/dd/yyyy format we have to write one more line before converting datetime.
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
DateTime dtstart = Convert.ToDateTime(txtStart.Text);
I hope this helps you.
If You find right answer then please send me comment.
go through this link for wcf introduction
http://msdn.microsoft.com/en-us/library/aa480190.aspx
No comments:
Post a Comment