select DATEADD(month, DATEDIFF(month, '1900/01/01', getdate()) -1,'1900/01/01')
=>上個月第一天的日期
=> ex:2013-03-01 00:00:00.0
select DATEADD(day,-1,DATEADD(month, DATEDIFF(month, '1900/01/01', getdate()),'1900/01/01'))
=>上個月最後一天的日期
=>ex:2013-03-31 00:00:00.0