Till Next Time
Thursday, November 20, 2008
SSIS First of the month Expression builder
DATEADD( "M", -24, (DT_DATE) ((DT_WSTR, 2) MONTH(getdate()) + "/"+"01" + "/" + (DT_WSTR, 4) YEAR( GETDATE())))
Wednesday, November 19, 2008
SSIS First and Last Day of the month
Till Next Timedeclare @date datetimeset
@date = getdate()
--get first day of month
select dateadd(m, datediff(m, 0, @date), 0)
--get last day of month
select dateadd(m, datediff(m, 0, dateadd(m, 1, @date)), -1)
Subscribe to:
Posts (Atom)