Unanswered: Problems with Expression Builder in SSIS
I have a variable that I created in SSIS. This variable name is StartDate and its a datetime data type.
I want to set this date to eb 12 hours from the current date and hour that we are currently in. I know how to wright this in sql but i am having a hard time finding out how to write it in the expression builder in ssis. Below is the sql that I would use to achive this.
DECLARE @StartDate DATETIME
SET @StartDate = DATEADD(HOUR,(DATEDIFF(HOUR,-1,GETDATE())),-1) - '12:00'
After spending some time researching I was able to figure out how to get the result that I wanted in the expression builder. To start off I went ahead and created a string variable instead of a datetime variable. Once I did that I used the expression below to give me the result that I needed.