Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
| Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 20th, 2007, 02:49 PM
Friend of Wrox
Join Date: Apr 2006
Location: , , .
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with date conversion


We use an english version windows server.
The regional setings are set to French (France).
Asp.Net renders and interprets the date correctly (dd/mm/yyyy). So does Sql
Server (date is saved in dd/mm/yyy format in datetime field).

When inputting a date into a textbox (dd/mm/yyyy) which must be inserted in
Sql server, there comes an error "string cannot be converted to date ...".
By applying <globalization culture="fr-BE" uiCulture="fr-BE" />, the problem
is solved.

My question is: why does this happen? The two parties (ASP.NET and Sql
server) understand each other and understand the right date format, no? So,
can the conversion process be considered as a third party between ASP.NET
and Sql Server, which always apply the english date format (mm/dd/yyyy)?

Why this confusing distinction between the regional settings and culture?


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNIX Date Conversion darrenb Access 4 March 11th, 2008 06:27 AM
Date conversion Issue dhay1999 Access 2 May 30th, 2007 06:47 AM
Date Conversion ashokparchuri General .NET 2 May 31st, 2005 01:26 AM
Date conversion AFK SQL Language 2 February 4th, 2005 05:14 PM
Date conversion lily611 General .NET 6 December 6th, 2004 12:41 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.