Skip to content

Instantly share code, notes, and snippets.

@azcoov
Created August 16, 2011 07:03
Show Gist options
  • Save azcoov/1148582 to your computer and use it in GitHub Desktop.
Save azcoov/1148582 to your computer and use it in GitHub Desktop.
Custom File Name Expression for SSIS
"\\\\filepath" +
(DT_WSTR, 4) YEAR( DATEADD("d", -1, getdate()) ) +
( MONTH( DATEADD("d", -1, getdate()) ) < 10 ? "0" : "" ) + (DT_WSTR, 2) MONTH( DATEADD("d", -1, getdate()) ) +
( DAY( DATEADD("d", -1, getdate()) ) < 10?"0":"" ) + (DT_WSTR, 2) DAY( DATEADD("d", -1, getdate()) ) +
".txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment