Toad World® Forums

Toad Data Point 4.0 Automation Bug: Set Variable activity not setting DateTime correctly, so Add_Months does not work

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.

Hello ericchil,

We are sorry to hear that such problem occurred. Please note that this specific bug was addressed as a part next release. You should be able to use the fix in the upcomming TDP Beta version hopefully within the end of August.

Martin

We are working on a patch to TDP 4.0.1. A fix for this issue is in the current Beta build. Please download and try.