SSIS GETDATE Function

The SSIS GETDATE function is a Date/Time function that returns the current date and time of the local system. This article explains how to use the GETDATE function with an example and the syntax for finding the system’s current date and time is shown below.

GETDATE()

To demonstrate the GETDATE function, we use the Employee table below, which has 15 records. Please refer to the Union All Transformation, Derived Column Transformation, Built-in Functions, and SQL Server articles in SSIS.

Source Table

SSIS GETDATE function

For this GETDATE example, add a Data Flow Task and double-click on it to enter the Data Flow region. Next, add the OLE DB Source to read data from the above SQL database table. Please join the OLE DB Source to Derived Column Transformation because it helps to write GETDATE expressions and create new columns.

Data Flow to add Derived Column

Next, double-click on it to open the Derived Column Transformation Editor. Drag and drop the SSIS GETDATE function to the row cell under the Expression to return the current date and time according to the local system.

GETDATE()
SSIS GETDATE Function Expression to get local system current date and time

Click OK to close the Editor window.

Drag and drop the Union All Transformation and connect the Derived Column. Next, right-click on the connection node and choose the Enable Data Viewer. Please run the SSIS GETDATE function package to see the current date and time according to the local system.

SSIS GETDATE Function to get local system current date and time