![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2006
Posts: 9
|
date times
using sql 2005 and .Net here on the Catalyst server.
In my web site i'm storeing dates into the database and there getting stored like so 14/08/2008 00:00:00 perfect this is how I want it. however when I retrieve the dates back to the website there getting change to 8/14/2008 12:00:00 any ideas why its doing this as on my local build its retrieving things fine. I've even tried using CultureInfo cultEnGb = new CultureInfo("en-GB"); and formatting the date using this but still comes out in mm/dd/yyyy format any ideas ? |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Apr 2006
Posts: 4
|
Culture settings
Not sure what you mean by culture settings, so just thrown this tag into the web config file.
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="de-DE" /> Still no joy... The only conversion I'm doing is running the site through the publish function in visual studio. |
|
|
|
|
|
#5 (permalink) |
|
Administrator
Join Date: Oct 2003
Posts: 1,484
|
Your culture settings are somewhat curious and where the error may be occuring. The culture the servers are servers are set at is en-GB. Your code is currently set to handle US style dates (MM/dd/yyyy) where your passing them European style dates (dd/MM/yyyy). I would suggest you change your culture settings to en-GB unless your are actually creating a german site (as suggested by the de-DE uiCulture string).
HTH Jas
__________________
Jason Robbins jason@catalyst2.com |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|