Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get date format programaticly...???
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00692775
Message ID:
00692848
Views:
24
It's better to wright your application to be independent of date format setting in Sql Server. Take a look at Writing International Transact-SQL Statements inBOL.
Anyway, here's the script to retrive dateformat setting.
CREATE TABLE #temp1 (Set_option varchar(64), Value Varchar(64))
INSERT INTO #temp1 
	EXECUTE ('DBCC USEROPTIONS')

SELECT Value AS dateformat 
	FROM #temp1
	WHERE Set_option = 'dateformat' 
DROP TABLE #temp1
>I'm using VFP 7 as front end and MsSQL 2000 as back end. When users run my application and a date is pushed to SQL, depending on there regional setting (Date format),it will fail.
>
>ex:
>SQL Dateformat is Set to MDY and the user local machine is set to DMY format it will fail.
>
>How can I get programaticly the SQL DATE format?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform