Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Weird Date Issue (forgetting its British!)

Author  Topic 

uberbloke
Yak Posting Veteran

67 Posts

Posted - 2002-01-08 : 05:16:05
Help!

I have a production server that seems to, occassionally, forget its British!

Example, today (8/1/2001) in the diary (asp app) was displayed as August 1st!

After 1/2 hour of hair tearing I rechecked the page and it was fine (January 8th).

Argh! This has happened before and I HAVE NO IDEA where to start.

Has anyone else seen this?

(W2K, SQL Server 2000 SP2, ASP)

uberbloke
Yak Posting Veteran

67 Posts

Posted - 2002-01-08 : 05:41:50
YOU ARE NOT GOING TO BELIVE THIS!

I have tracked down the reason.

When there is an active PC ANYWHERE connection to the remote machine the server goes to AMERICAN DATE FORMAT.

When the connection is dropped it all goes back to normal!

ARGH!

You have been warned!

Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-01-08 : 05:49:50
NICE

Man, that rocks!

For this reason, I always use dates in the format '8-jan-2002'. That works reliably. I have had issues before with ISP servers set differently to mine. This was gets around all of that.

Damian

Edited by - merkin on 01/08/2002 05:50:37
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-01-08 : 06:03:35
8-jan-2002 still has problems if you receive data from a foreign system.
Better to use 20020108 as this always works.

I had a problem with this with v6.0 and discovered that if the OS and sql server were installed using American format then it seemed to be consistent but if the server was installed as British then the default date format could change. It was as though the system was looking at a lot of properties to get the date format and if any were American it would take that.

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-01-08 : 12:44:05
quote:
It was as though the system was looking at a lot of properties to get the date format and if any were American it would take that.



Strange. It's not like we Americans (US edition) are ever self-centered, egotistical, think we're ALL IMPORTANT, or anything like that...

--------------------------------------------------------------
1000 Posts, Here I come! I wonder what my new title will be...
Go to Top of Page

jackstow
Posting Yak Master

160 Posts

Posted - 2002-01-09 : 04:58:18
I've had the same thing - and it was messing up some of the ASP code that used dates. There is a fix (at least for IIS if not SQL Server) though by using session onstart in global.asa ;

sub Session_OnStart
'converts local system to be English(United Kingdom)
Session.LCID = 2057
end sub

Jack

Go to Top of Page
   

- Advertisement -