Toad World® Forums

Automation generating bad results from Date data


#1

Automation Logging:09/22/2009 2:08:31 PM: Variable “Date_Rels” set to “#CompleteOrders.Date_Rels#”

Automation Logging:09/22/2009 2:08:31 PM: Variable value = Syntax error

Is this a known bug? Workaround?

In my automation script, I am setting variables, running a query on an Oracle db, then looping thru the query results to deliver output data to an email. The char() data resolves OK, but when I use date data I get strange results.
For example,
to_char(CREATION_DATE,‘MON-DD-YYYY’) Date_Rels
produces a numeric value based on the sum: (-dd -yyyy). Changing to ‘DD-MON-YYYY’ gives similar results.
See attachment for example.

If I use just the database attribute CREATION_DATE without converting to char, I get an error:


#2

to_char(sysdate, ‘MONTH DD YYYY’) mydate

Okay, I checked into this. I have some good news and some bad news.

The bad news --> your right. String dates are getting garbled. I am using some VB script to evaluate expressions. And any character such as ‘/’ or ‘-’ corrupts the string.

The only work around I found to work is to not use any of these characters. You would have to use a date value like SEPTEMBER 22 2009

This of course needs to be fixed, so I have entered CR 67,164 to be corrected in the next minor release.

Thanks for brining to my attention.

Debbie


#3

Okay this date issue as well as other items detailed in Cr 67,164 are now fixed and will be in the next Beta.

Debbie