Posts

Showing posts from 2017

SSIS - OLEDate CAST vs Implicit conversion to DT_DBDATE vs DateTime.FromOADate()

About date serials (OLE Dates) Date Serial represents the number of Days between the date value and the initial value that is  1899-12-30 Date Serials are used in Microsoft Excel and many other platform. You can Read more about Date Serials at: Why is 1899-12-30 the zero date in Access / SQL Server instead of 12/31? T-SQL to convert Excel Date Serial Number to Regular Date Date Serials in SSIS We can convert date serials to datetime  using  CAST method in the OLEDB Source SQL Command , or converting it using a script component  DateTime.FromOADate()   method, or we can connecting it directly to a  DBTYPE_DATE column. but there is difference between these methods 1) CAST method From  Microsoft Docs - CAST and CONVERT (Transact-SQL) : " Only supported when casting from character data to datetime or smalldatetime. When character data that represents only date or only time components is cast to the datetime or smalldatetime data types, the unspecified time compon

Version number Retrieval from .Dtsx files

Image
PackageFormatVersion Table When Opening a DTSX package with a Text Editor it contains a property name PackageFormatVersion  < DTS:Property   DTS:Name = " PackageFormatVersion " > 3 </ DTS:Property > This Property contains a value that indicate the version of SQL Server related to this Package, also it could indicate the Visual Studio Version used to develop this package. After Reading this Article From SQLStudies i found this Table SQL Version Build # PackageFormatVersion Visual Studio Version 2005 9 2    2005 2008 10 3    2008 2008 R2 10.5 3    2008 2012 11 6    2010 or BI 2012 2014 12 8    2012 CTP2 or 2013 2016 13 8    2015 To Retrieve FormatVersion from multiple dtsx file. Getting values within dtsx packages If you are trying to read a package version within this package you can access to one of the SSIS  system variables Variable Type Description ------------------------------------------- VersionBuild Int32 The pa