[导入]在SQL SERVER 2000中使用SET DATEFORMAT
2006-05-25 23:22 BAsil 阅读(120) 评论(0) 编辑 收藏 举报
When the language is set to us_english, the default order for the date is mdy. You can change the date order with the SET DATEFORMAT statement.
When the language is set to us_english, the default order for the date is ymd.
select @@language
sp_helplanguage
------------------------------------
SET DATEFORMAT mdy
GO
DECLARE @datevar datetime
SET @datevar = '12/31/98'
SELECT @datevar
GO
When the language is set to us_english, the default order for the date is ymd.
select @@language
sp_helplanguage
------------------------------------
SET DATEFORMAT mdy
GO
DECLARE @datevar datetime
SET @datevar = '12/31/98'
SELECT @datevar
GO
文章来源:http://blog.donews.com/basilwang/archive/2004/12/10/199541.aspx