I'm having a weird issue when where the date format of from the date fields changes from 4/16/2009 12:00:00 AM to 16/04/2009 00:00:00. I set the application to write out each stored proc that fired with the same corresponding date field if it exists. Here's what came out. You'll notice that the format switch inexplicable half way through.
EXECUTE uspContent_SelectOne '132'
4/16/2009 12:00:00 AM
EXECUTE uspContent_SelectOne '127'
4/16/2009 12:00:00 AM
EXECUTE uspContent_SelectOne '133'
4/16/2009 12:00:00 AM
EXECUTE uspContent_SelectOne '131'
4/16/2009 12:00:00 AM
EXECUTE uspAttachment_SelectAll
EXECUTE uspArticleAuthors_SelectAll_ArticleId '3'
EXECUTE uspArticles_SelectOne '3'
EXECUTE uspAuthors_Letters
EXECUTE uspAuthors_Letters
EXECUTE uspAuthors_Letters
EXECUTE uspAuthors_SelectAll_Letter_LastName 'A'
EXECUTE uspFiles_SelectAll_NoFileData
EXECUTE uspArticles_SelectOne '3'
EXECUTE uspArticleTypes_SelectAll
EXECUTE uspFiles_SelectAll_NoFileData
EXECUTE uspAuthors_SelectOne '0'
EXECUTE uspArticleAttachments_SelectAll_ArticleId '3'
EXECUTE uspArticleAttachments_SelectOne_ArticleId_AttachmentId '3','4'
EXECUTE uspAttachment_SelectOne '4'
EXECUTE uspContent_SelectOne '132'
16/04/2009 00:00:00
EXECUTE uspContent_SelectOne '127'
16/04/2009 00:00:00
EXECUTE uspFiles_SelectOne_NoFileData '60'
EXECUTE uspArticleAttachments_SelectOne_ArticleId_AttachmentId '3','3'
EXECUTE uspAttachment_SelectOne '3'
EXECUTE uspContent_SelectOne '133'
16/04/2009 00:00:00
EXECUTE uspContent_SelectOne '131'
16/04/2009 00:00:00
EXECUTE uspAttachment_SelectAll
EXECUTE uspArticleAuthors_SelectAll_ArticleId '3'
EXECUTE uspAuthors_SelectAll_Letter_LastName 'A'
EXECUTE uspContent_SelectOne '129'
18/09/2008 00:00:00
EXECUTE uspContent_SelectOne '7'
18/09/2008 00:00:00
EXECUTE uspContent_SelectOne '8'
18/09/2008 00:00:00
EXECUTE uspContent_SelectOne '9'
18/09/2008 00:00:00
EXECUTE uspContent_SelectOne '10'
18/09/2008 00:00:00
EXECUTE uspContent_SelectOne '11'
18/09/2008 00:00:00
EXECUTE uspFiles_SelectAll_NoFileData
I can't figure out why. I'm using the ASP.NET/C#, SQL Server 2005, and the MS Enterprise Library 4.1.
UPDATE 1
I checked the culture settings of the app and got this. For every date field query I checked the culture. In the screen shot below you can see how the culture changes from US to UK:
image of cuture changing http://www.craigmoliver.com/cultureissue.jpg
The setting in the web.config it's set as follows:
<globalization culture="en-US" uiCulture="en-US" requestEncoding="utf-8" responseEncoding="utf-8" enableClientBasedCulture="false" />