In TDP 3.7, in the Set Variable or Set Variable Value activities, this works fine:
END_DATE is Datetime and set to ‘07/31/2016’
START_DATE is Datetime and set to Last_Day(Add_Months(#END_DATE#,-1))
Timestamp Message
8/12/2016 2:35:50 PM Variable “END_DATE” set to 7/31/2016 12:00:00 AM
8/12/2016 2:35:50 PM Variable “START_DATE” set to 6/30/2016 12:00:00 AM
Note that the timestamp is set to 12:00:00 AM
In TDP 4.0, the same code returns:
Timestamp Message
8/12/2016 2:10:42 PM Variable “END_DATE” set to 07/31/2016 00:00:00.00
8/12/2016 2:10:42 PM Set_Variable_1 - mismatched input ‘00’ expecting ‘)’ line 1:31
8/12/2016 2:10:42 PM Failed
Note the timestamp is now 00:00:00.00. I think this is what is causing Last_Day(Add_Months(#END_DATE#,-1)) to break. Note the error message says "mismatched input ‘00’…
I tried setting the dates as a SQL variable, but it didn’t work.
This makes it impossible to manipulate Datetime variables in Automation, which is crucial.