how can i change lastloaddate to 1900-01-01, 00:00:00.000 but in SSIS using expression…
- User
how can i change lastloaddate to 1900-01-01, 00:00:00.000 but in SSIS using expression like evaluate expression task
- Assistant
To change the
lastloaddateto "1900-01-01 00:00:00.000" in SSIS using an Expression Task, you can follow these steps:-
Drag and drop an "Expression Task" onto the Control Flow canvas in your SSIS package.
-
Double-click on the Expression Task to open its editor.
-
In the editor, under the "Expressions" section, click on the ellipsis button (...) to open the Expression Builder.
-
In the Expression Builder, in the "Property" dropdown, select the "Expression" option.
-
In the Expression textbox, enter the following expression:
(DT_DBTIMESTAMP)"1900-01-01 00:00:00.000"This expression will convert the string value "1900-01-01 00:00:00.000" to a DT_DBTIMESTAMP data type.
-
Click on the Evaluate Expression button to check the evaluated result. It should show the DateTime value as "1900-01-01 00:00:00.000".
-
Click on OK to close the Expression Builder.
-
Click on OK to close the Expression Task editor.
By following these steps, you will have set the
lastloaddateto the desired value using an Expression Task in SSIS. -
- User
@[User::lastloaddate] to “1900-01-01 00:00:00.000” in Expression Builder
- Assistant
To set the value of the variable
lastloaddateto "1900-01-01 00:00:00.000" in the Expression Builder, you can follow these steps:-
Open the Expression Builder by double-clicking on the Expression Task or by right-clicking on the Task and selecting Edit.
-
In the Expression Builder, find the "Expression" property where you want to set the value. It should be something like
@[User::lastloaddate]. -
Click on the ellipsis button (...) next to the Expression property to open the Expression Editor.
-
In the Expression Editor, enter the following expression:
(DT_DBTIMESTAMP)"1900-01-01 00:00:00.000"This expression casts the string value "1900-01-01 00:00:00.000" to the DT_DBTIMESTAMP data type.
-
Click on the Evaluate Expression button to check the evaluated result. It should show the DateTime value as "1900-01-01 00:00:00.000".
-
Click on OK to close the Expression Editor.
-
Click on OK to close the Expression Builder.
By following these steps, the value of the
lastloaddatevariable will be set to "1900-01-01 00:00:00.000" using the Expression Builder in SSIS. -
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.