SSIS Snack: Package Version

Here’s a couple cool SSIS Expressions for creating Package Version strings:

Format: 1.0.0

(DT_STR,4,1252) @[System::VersionMajor] + “.” + (DT_STR,4,1252) @[System::VersionMinor] + “.” + (DT_STR,4,1252) @[System::VersionBuild]

Format: 1.0.0.20100106

(DT_STR,4,1252) @[System::VersionMajor] + “.” + (DT_STR,4,1252) @[System::VersionMinor] + “.” + (DT_STR,4,1252) @[System::VersionBuild] + “.” + (DT_STR,4,1252) Year(GetDate()) + (Month(GetDate()) < 10 ? “0” + (DT_STR,2,1252) Month(GetDate()) : (DT_STR,2,1252) Month(GetDate()))  + (Day(GetDate()) < 10 ? “0” + (DT_STR,2,1252) Day(GetDate()) : (DT_STR,2,1252) Day(GetDate())) 

Enjoy!

:{> Andy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.