Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identical function returns different data??? 2

Status
Not open for further replies.

MatsHulten

Programmer
Dec 29, 2000
180
0
0
SE
I'm developing a site locally on a 2000 Advanced Server running MS SQL Server 2000.

The regional settings shows that the current dateformat is according to Swedish standard (yyyy-MM-dd).

An ASP-script trying to access data from a datetime field in the server populates a variable using FormatDateTime(Now(),2) Witch returns the string "24/04/2001" As far as I can see this is the UK date format.

The same function call executed on the same machine using the debug window in VB returns the string "2001-04-24" wich is the correct Swedish format, that I can execute on the server without it giving me errors.

One of mu collegus run a similar enviroment, and he doesn't run in to this problem...

This seems to be a problem with the settings in the IIS, but i can't find it!

Please help me! I can't simply code around this, as it is code executed in myriad places throughout the scripts...

-Mats Hulten
 
Hi,

You must use Session.LCID to set it. See the LCID code for the zone you want.

Regards,
Luís Silva
 
Works like a charm!!!

Do you know if there is a way to access this function from within an Active-X?

If you write an object that doesn't uses the session object, but you still want this (and only this) object to work with a different langage code.

-M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top