Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 Date Format Issue
Posted by RAJESH KUMAR VISHWAKARMA on  11/18/2009 3:01:47 AM Category: ADO.NET
Add to my favorites
Email to friend
I am tring to store Date in this fromat 10/26/2009 in sql2000 through DateTime Picker in
When i pick up date from DateTime Picker, 10/26/2009 date format is coming in TextBox.

But in database 2009-10-26 Format is coming. i know Sql server doesn't support dd/mm/yyyy.

For Storing i am writing following syntax

I need to store in this format 10/26/2009 (MM/DD/YYYY) in database

Could You plz Help Me?

Thank you!

Post Your Reply Post New Question

 Viewer's Reply
Specify Collations in SQL Table Creation
Answered By Moderator1 on 11/19/2009 7:01:00 AM

By default, as you knew, SQL Server will store dates in yyyy/MM/dd format. Anyhow, try to change the collation setting of the database, or while creating the table try to find the correct collation name for storing the date in your format. But I'm not sure on this.

Btw, may I know why you want to store the date in dd/MM/yyyy format. Is it making problem while displaying it, if so, you can format it. Please post in this thread, if you have any further questions regarding the DateTime format.

Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Windows 8: 50 Questions and Answers You Need to Make a Decision (Normally $9.95)
Many .NET teams are underperforming, is yours?