views:

78

answers:

1

I send the registration date parameter to mysql database like "22-12-2010". But my sql date date type is in another formate how can i change the date formate like "2010-12-22" also i have to insert this into table.

Give code in c#,asp.net code behind either sql query statement!

                         Cheerss!!!!!
  **Thanks
   A.Ayyappan**
A: 

Use this comprehensive MSDN pages as your guide: Standard Date and Time Format Strings and Custom Date and Time Format Strings.

There are many examples on those pages on how to reformat a date string in C#, and they also provide a good clear explanation on how date formatting works in the DateTime class.

Once you've reformatted your date string in C#, you should be able to pass it on down without needing to use SQL to reformat it.

Mike Atlas