Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get date format programaticly...???
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00692775
Message ID:
00692998
Vues:
24
Thanks for the script. I was looking for a stored proc.

If I make a change in the Syslangage file of the Master Database will it affect all user on the current server?



>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?
Luc Nadeau
lnadeau@neova.ca

"the theory, it is when all is known and that nothing works. The practice, it is when all works and that nobody knows why." - Albert Einstein (Nobel of physique 1921)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform