Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 18th, 2004, 04:48 AM
tamagotchi tamagotchi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 tamagotchi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Hosting server regional settings in US, I want them in FR-CH !

Hi,

My hosting server has American regional settings (dates are mm/jj/yyyy hh:mm:ss XM) and, since I have swiss visitors, I would like to view my dates as jj.mm.yyyy hh:mm:ss
I could make a function to display it in swiss format, but it would be too long to change everywhere. Is there a possibility to define new regional settings just after the connection string, or something like that ?

Please help, very urgent.

http://www.manege-corsier.ch

Reply With Quote
  #2  
Old April 19th, 2004, 02:07 AM
Scorpions4ever Scorpions4ever is offline
Mad Rater
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 126 Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level)Scorpions4ever User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 31 m 44 sec
Reputation Power: 8
Yes, the parameter in question is called Locale Identifier and you have to set it in the connection string something like this:
"Locale Identifer=4108;"

See http://msdn.microsoft.com/library/d...l/vsmscLCID.asp for a list of valid locale identifiers.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.

Reply With Quote
  #3  
Old April 19th, 2004, 03:47 AM
tamagotchi tamagotchi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 tamagotchi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation

Well, I've added it in my connection string :

dbconn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sql.mywebserver.com;DATABASE=mydb;UID=user; PWD=pwd;Locale Identifier=4108;"

But I still see dates as "4/17/2004 03:15:45 PM" for April, 17th 2004...
I want "17/04/2004 15:15:45" or "17.04.2004 15:15:45" !!!

I've tried Session.LCID=1408, but it returns me "Bad LCID".

Do I have to put a little function like "US2CH" in front of all my dates ? If yes, that really suck !

I'm programming SQL for years, and I never found a solution to this problem ! Please help me.....

Reply With Quote
  #4  
Old April 19th, 2004, 03:49 AM
tamagotchi tamagotchi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 tamagotchi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK I'm too bad...
Session.LCID = 4108 (not 1408) and it shows me dates as I wanted to...

Thanks a lot...

Reply With Quote
  #5  
Old April 19th, 2004, 03:53 AM
tamagotchi tamagotchi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 tamagotchi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry

OK now, i just realize i've got another problem... When I do "Now()", it returns me the USA time (for. ex. it is 09:52 in Switzerland, and 02:52 in USA)
What should I do to change the Locale Time Zone ?

Last edited by tamagotchi : April 19th, 2004 at 03:56 AM.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Hosting server regional settings in US, I want them in FR-CH !


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT