Link to home
Start Free TrialLog in
Avatar of carlpaddick
carlpaddick

asked on

Restructuring SQL queries according to SQL database Locale Settings

I have a client app (written in C++) that uses ADO to retrieve records from a SQL 7 server database table.  The query performed uses datetime values as parameters in the format dd/mm/yyyy.  The locale of the SQL Server table that I am accessing is US English.  Consequently, when I perform queries using my app, no results are returned because the app month and day values are the wrong way round for the database table.

I was wondering whether there is a way of finding out (using code) what locale setting the SQL Server database is currently configured to, so that I can adjust the datetime parameters in the query in my app from dd/mm/yyyy to mm/dd/yyyy.
ASKER CERTIFIED SOLUTION
Avatar of missionImpossible
missionImpossible

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of carlpaddick
carlpaddick

ASKER

Thanks missionimpossible,

Mission accomplished
you're welcome!