Solved

Retrieved date from MsSQL in French

Posted on 2012-03-20
3
256 Views
Last Modified: 2012-06-27
Hello,

When I retrieve a datetime field from MsSQL, it appears in French e.g. 20/mars/2012 9:03. Anyone know how to sort this out. I have tried the code date_default_timezone_set('GMT'); but didn't work. Any suggestions?
0
Comment
Question by:previewservices
3 Comments
 
LVL 9

Accepted Solution

by:
armchair_scouse earned 500 total points
ID: 37741533
According to the web, to change the server language to British English, you'd use

EXEC sp_configure 'default language', 23
RECONFIGURE

Run to verify: SELECT @@language, @@langid

To change the language of a particular login to britsh english, use
EXEC sp_defaultlanguage 'username', 'british'

Alternatively, handle dates in the YYYY-MM-DD format, which I believe is the ISO standard, and therefore you'd have no problems with whatever language setting your scripts run under.
0
 
LVL 30

Expert Comment

by:IanTh
ID: 37741536
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37741736
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now