# Weird Variable Bug

**URL:** <https://forums.toadworld.com/t/weird-variable-bug/7194>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [April 3, 2012, 1:28pm UTC](https://forums.toadworld.com/t/weird-variable-bug/7194 "2012-04-03T13:28:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![N.B](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@N.B](https://forums.toadworld.com/u/N.B)\
**Post date:** [April 3, 2012, 1:28pm UTC](https://forums.toadworld.com/t/weird-variable-bug/7194/1 "2012-04-03T13:28:58Z")

</div>

This is really weird.

I have a very simple SQL-based variable to return a date format:

> SELECT TO\_CHAR(SYSDATE,'YYYY-MM-DD') FROM DUAL  
> When I run this in a TDA editor, I get the expected value of '2012-04-03' (for today).

But when I run this in the automated script, it sets the value to '2005'. It appears that the automation is subtracting the MM and DD from the YYYY when setting the value of the variable.

I'm going to go out on a limb and say this shouldn't be happening?

---

<div class="post-metadata">

**Author:** ![N.B](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@N.B](https://forums.toadworld.com/u/N.B)\
**Post date:** [April 3, 2012, 1:44pm UTC](https://forums.toadworld.com/t/weird-variable-bug/7194/2 "2012-04-03T13:44:32Z")

</div>

This appears to be a bug with 3.0 as running the same thing in an automation script in the 3.1 beta results in the expected value.

Is there a release date for 3.1 yet? I’ve been told not to roll out the 3.1 beta to production as too many reports are business critical. It’s been stable for my use, but I like my job so I do as I’m told.

---

<div class="post-metadata">

**Author:** ![IgorM](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/igorm/32/116_2.png) [@IgorM](https://forums.toadworld.com/u/IgorM)\
**Post date:** [April 3, 2012, 4:00pm UTC](https://forums.toadworld.com/t/weird-variable-bug/7194/3 "2012-04-03T16:00:07Z")

</div>

Release date for TDA 3.1 is today. I’ve just announced it.

Thanks,

Igor.
