when i’m inserting data to the sql server 2008 database through asp.net application date inserted to the database in the following format
“10 june 2011”
this is wrong and i need “dd/mm/yyyy” or “yyyy/mm/dd” format to be inserted.why does this happen
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your data type on the database side is either
datetimeordate(on sql server 2008), it shouldn’t matter whether you insert the date as'10 june 2011'or as'6/10/2011'or as'2011-06-10'. If you see the data actually being displayed as'10 June 2011'that’s more likely because your data type isvarcharornvarchar. If that’s the case and the field is only meant to hold dates, I would advise you to change the data type to be actually adatetimeordate.