随笔-199  评论-203  文章-11  trackbacks-0

declare @stYear int
declare  @stMonth int

set @stYear =2009
set @stMonth =2
declare  @startdate varchar(15),@stop varchar(15)
select @startdate= cast(@stYear as varchar(15)) +'-0'+ cast(@stMonth as varchar(15)) +'-01'
select @startdate, dateadd(day,-1,dateadd(month,1,@startdate))

posted on 2009-03-25 14:48 Werther 阅读(257) 评论(0)  编辑  收藏 所属分类: 15.SQL Server

只有注册用户登录后才能发表评论。


网站导航: