SSIS - Find first day and last day of previous week in SSIS expression

In order to get the first and last day of the previous week, we can use the following expressions within derived columns:
First day of previous week
DATEADD("wk",DATEDIFF("wk",7,GETDATE()),0)
Last day of previous week
DATEADD("wk",DATEDIFF("wk",7,GETDATE()),6)
References

Comments

Popular posts from this blog

SSIS - Script Task error: Exception has been thrown by the target of an invocation.

Don’t install Hadoop on Windows!

SSIS - script component DateTime Formats Implicit Conversion