Skip to content

Instantly share code, notes, and snippets.

@belenaj
Last active November 22, 2017 13:08
Show Gist options
  • Save belenaj/40ba38161d5b80941efa67bc3b6c190b to your computer and use it in GitHub Desktop.
Save belenaj/40ba38161d5b80941efa67bc3b6c190b to your computer and use it in GitHub Desktop.
SSIS | Date to YYYYMMDD String #SSIS #Date #String #YYYYMMDD

SSIS | Date to YYYYMMDD String

This expression will convert a datetime field in format YYYYMMDD

i.e. with <datetime> ='2017-01-03 13:18:13.667' it will return 20170103 [String (8)]

Just replace for your field name

(DT_WSTR, 8)REPLACE((DT_WSTR, 10)(DT_DBDATE)<datetime>,"-","")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment