# In Automation, Export Wizard Doesn't Pass DateTime Correctly, Throws "not a valid month" error

**URL:** <https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [August 26, 2014, 2:49pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774 "2014-08-26T14:49:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [August 26, 2014, 2:49pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/1 "2014-08-26T14:49:22Z")

</div>

Using the Set Variable activity to set two date time fields, then using the Export Wizard activity to call a SQL script that uses those datetime parameters as input throws the following error message.

Timestamp Message  
8/26/2014 3:44:34 PM Variable “COUNTY” set to ‘ARCHULETA’  
8/26/2014 3:44:34 PM Variable “TSTART\_DATE” set to 8/1/2013 12:00:00 AM  
8/26/2014 3:44:34 PM Variable “TEND\_DATE” set to 7/31/2014 12:00:00 AM  
8/26/2014 3:44:34 PM CYFF - ORA-01843: not a valid month

8/26/2014 3:44:34 PM Failed

It works just fine using the Select to File activity instead of Export Wizard, but Export Wizard has the ability to append rows in Excel, while Select to File does not.

This is Toad Data Point 3.5

---

<div class="post-metadata">

**Author:** ![GregDavis11009](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gregdavis11009/32/122_2.png) [@GregDavis11009](https://forums.toadworld.com/u/GregDavis11009)\
**Post date:** [August 27, 2014, 7:43am UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/2 "2014-08-27T07:43:00Z")

</div>

What database platform are you using (Oracle, SQL Server, Sybase, etc.)? You might have better luck passing the variable as text and using a To\_Date function (Oracle) or Convert function (SQL Server/Sybase) as a work around.

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [August 27, 2014, 8:24am UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/3 "2014-08-27T08:24:45Z")

</div>

Oracle. I could do that, but I’d have to change a lot of scripts. Just hoping bugs like this can be fixed for the next release.

---

<div class="post-metadata">

**Author:** ![AlekseyBazhenov](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@AlekseyBazhenov](https://forums.toadworld.com/u/AlekseyBazhenov)\
**Post date:** [August 27, 2014, 10:15am UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/4 "2014-08-27T10:15:32Z")

</div>

Please check that your variable has type DateTime and set correctly like on the following screen shot

![3324.Capture.png](https://global.discourse-cdn.com/quest/original/2X/4/4c109fc88f2f061c855aaeceb3795a31aa0ec1b7.png)

After that you can use the variable in SELECT like

SELECT ORDER\_ID, ORDER\_DATE, SHIPPING\_ADDRESS\_ID, BILLING\_ADDRESS\_ID, CONTACT\_ID, ESTIMATED\_SHIP\_DATE, ACTUAL\_SHIP\_DATE, AMOUNT\_BILLED

FROM QUEST\_DEV.ORDERS

WHERE ESTIMATED\_SHIP\_DATE \< **:VarDateTime**

Regards

Aleksey

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [August 27, 2014, 2:03pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/5 "2014-08-27T14:03:10Z")

</div>

Thanks Aleksey,

It doesn't work in the Export Wizard activity.

On Wed, Aug 27, 2014 at 11:16 AM, Aleksey Bazhenov [bounce-AlekseyBazhenov@toadworld.com](mailto:bounce-AlekseyBazhenov@toadworld.com) wrote:

> **[RE: In Automation, Export Wizard Doesn't Pass DateTime Correctly, Throws "not a valid month" error](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48586.aspx#48586)**

> Reply by Aleksey Bazhenov  
> Please check that your variable has type DateTime and set correctly like on the following screen shot

> 

> After that you can use the variable in SELECT like

> 

> SELECT ORDER\_ID, ORDER\_DATE, SHIPPING\_ADDRESS\_ID, BILLING\_ADDRESS\_ID, CONTACT\_ID, ESTIMATED\_SHIP\_DATE, ACTUAL\_SHIP\_DATE, AMOUNT\_BILLED

> 

> FROM QUEST\_DEV.ORDERS

> 

> WHERE ESTIMATED\_SHIP\_DATE \< **:VarDateTime**

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-data-point/f/36/t/22628.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad Data Point - General](http://www.toadworld.com/products/toad-data-point/f/36.aspx?subscribe=false) notifications altogether.
> 
> Toad Data Point - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48586.aspx?AbuseContentId=c6a97518-4330-4ff8-9401-3713fd9711e0&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

--  
**Eric Chilenskas**

**Performance Data Specialist**

[Eric.Chilenskas@state.co.us](mailto:Eric.Chilenskas@state.co.us)

---

<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:** [August 27, 2014, 2:17pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/6 "2014-08-27T14:17:31Z")

</div>

TDP 3.5 Select to File activity now has the same set of properties when exporting to xls/xlsx as Export Wizard. Please check Advanced Properties button.

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [August 27, 2014, 2:52pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/7 "2014-08-27T14:52:00Z")

</div>

Select to File doesn’t have the ‘append rows’ option. It overwrites data saved to the same sheet. I’m taking data from multiple sources and putting them into the same sheet, which is why I’m using the Export activity.

I’m working around it by putting data on separate tabs, then writing a script without a datetime variable to select \* into one tab via the Export activity.

---

<div class="post-metadata">

**Author:** ![GregDavis11009](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gregdavis11009/32/122_2.png) [@GregDavis11009](https://forums.toadworld.com/u/GregDavis11009)\
**Post date:** [August 27, 2014, 4:46pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/8 "2014-08-27T16:46:24Z")

</div>

You can export to a csv file and then call a batch job to append. If your batch job (call it AddFiles.bat) contains Type path%1.csv\>\>path\TotalFile.csv and you pass the new file name as the first parameter each time, at the end you will have all your data in TotalFile.csv. In Automation you use a Run Program step to call AddFiles.bat (include the path) and on the arguments line you pass the [tag:FileName]# variable or literal text of the file name (use double quotes around it if there are spaces in your path or file name). You can put this inside of a loop function to use the variable file name.

---

<div class="post-metadata">

**Author:** ![chad.king](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@chad.king](https://forums.toadworld.com/u/chad.king)\
**Post date:** [August 28, 2014, 6:02am UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/9 "2014-08-28T06:02:09Z")

</div>

We’ve discussed it from my companies’ end as well and this is something I believe they have addressed in the upcoming 3.6 version. I’ve seen the option and there will be an append to the same worksheet option on the export wizard in that version. You should try the Beta 3.6 and see if that works for you and accomplishes what you need. It did for us.

Chad

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [September 4, 2014, 10:34am UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/10 "2014-09-04T10:34:19Z")

</div>

Toad Data Point 3.6 still doesn’t pass datetime without an error under the Export activity.

I see that Select to File has the ‘Append’ option, but now I’m getting ‘character set mismatch’ errors on scripts that run perfectly fine in TDP 3.5 in Oracle.

---

<div class="post-metadata">

**Author:** ![Kiki](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kiki](https://forums.toadworld.com/u/Kiki)\
**Post date:** [September 4, 2014, 3:10pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/11 "2014-09-04T15:10:07Z")

</div>

I have no problem to use datetime variable in select to file activity with append. Can you send your tas file to [yake.li@quest.com](mailto:yake.li@quest.com) to investigate. Thanks!

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [September 4, 2014, 3:16pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/12 "2014-09-04T15:16:39Z")

</div>

Not in Select to File, but in the Export Wizard activity. I need Export Wizard because it has append, S to File does not in 3.5. I was told it does in 3.6 but other bugs crop up in 3.6 that prevent me from using it.

In 3.6 Beta passing dates to export wizard doesn't work either.

I use TDP 3,5 and Oracle

Sent from my iPhone

On Sep 4, 2014, at 4:10 PM, Kiki [bounce-Kiki@toadworld.com](mailto:bounce-Kiki@toadworld.com) wrote:

> **[RE: In Automation, Export Wizard Doesn't Pass DateTime Correctly, Throws "not a valid month" error](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48737.aspx#48737)**

> Reply by Kiki  
> I have no problem to use datetime variable in select to file activity with append. Can you send your tas file to investigate.

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-data-point/f/36/t/22628.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad Data Point - General](http://www.toadworld.com/products/toad-data-point/f/36.aspx?subscribe=false) notifications altogether.
> 
> Toad Data Point - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48737.aspx?AbuseContentId=f4085b4e-4139-4a3f-97d5-ccd498089ec9&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [September 4, 2014, 4:19pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/13 "2014-09-04T16:19:39Z")

</div>

Eric, can you send export wizard template and details on what is occurring to me in private email and we will investigate. [debbie.peabody@quest.com](mailto:debbie.peabody@quest.com) Include connection type, version and screenshots of results along with the export template.

---

<div class="post-metadata">

**Author:** ![eric.chilenskas](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@eric.chilenskas](https://forums.toadworld.com/u/eric.chilenskas)\
**Post date:** [September 11, 2014, 1:30pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/14 "2014-09-11T13:30:33Z")

</div>

Hi, Debbie,

Thanks for responding. I've written up a document with the two biggest TDP 3.5 bugs that affect my work, and have attached supporting files.

The version is Toad Data Point 3.5.0.2926. The connection type is to Oracle 11g using SID.

The Word document has explanations & screenshots. The Test.txp is the export file for the second error mentioned in the document.

I would be grateful if both of these issues were resolved in the coming release.

The bugs are both in Automation, Toad not passing list parameters correctly, which forces me to hard code lists, and is a lot of extra work, and secondly in Automation not passing datetime parameters properly in the Export Wizard activity. Both explained in the .doc.

If you have questions or need more information, please let me know. I'm eager to get these resolved.

Eric

On Thu, Sep 4, 2014 at 5:20 PM, Debbie Peabody [bounce-Debbie\_Peabody@toadworld.com](mailto:bounce-Debbie_Peabody@toadworld.com) wrote:

> **[RE: In Automation, Export Wizard Doesn't Pass DateTime Correctly, Throws "not a valid month" error](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48739.aspx#48739)**

> Reply by Debbie Peabody  
> Eric, can you send export wizard template and details on what is occurring to me in private email and we will investigate. [debbie.peabody@quest.com](mailto:debbie.peabody@quest.com) Include connection type, version and screenshots of results along with the export template.

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-data-point/f/36/t/22628.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad Data Point - General](http://www.toadworld.com/products/toad-data-point/f/36.aspx?subscribe=false) notifications altogether.
> 
> Toad Data Point - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48739.aspx?AbuseContentId=147a21b6-f0df-4f05-bdd5-7cae78ab9030&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

--  
**Eric Chilenskas**

**Performance Data Specialist**

[Eric.Chilenskas@state.co.us](mailto:Eric.Chilenskas@state.co.us)

---

<div class="post-metadata">

**Author:** ![GregDavis11009](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gregdavis11009/32/122_2.png) [@GregDavis11009](https://forums.toadworld.com/u/GregDavis11009)\
**Post date:** [September 11, 2014, 2:31pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/15 "2014-09-11T14:31:18Z")

</div>

Try using MM instead of mm in the to\_Date function for the month.

**From:** ericchil [[mailto:bounce-ericchilenskas@toadworld.com](mailto:bounce-ericchilenskas@toadworld.com)]

**Sent:** Thursday, September 11, 2014 2:32 PM

**To:** [toaddatapoint@toadworld.com](mailto:toaddatapoint@toadworld.com)

**Subject:** Re: [Toad Data Point - Discussion Forum] In Automation, Export Wizard Doesn’t Pass DateTime Correctly, Throws “not a valid month” error

**[Re: In Automation, Export Wizard Doesn’t Pass DateTime Correctly, Throws “not a valid month” error](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48860.aspx#48860)**

Reply by ericchil

Hi, Debbie,

Thanks for responding. I’ve written up a document with the two biggest TDP 3.5 bugs that affect my work, and have attached supporting files.

The version is Toad Data Point 3.5.0.2926. The connection type is to Oracle 11g using SID.

The Word document has explanations & screenshots. The Test.txp is the export file for the second error mentioned in the document.

I would be grateful if both of these issues were resolved in the coming release.

The bugs are both in Automation, Toad not passing list parameters correctly, which forces me to hard code lists, and is a lot of extra work, and secondly in Automation not  
passing datetime parameters properly in the Export Wizard activity. Both explained in the .doc.

If you have questions or need more information, please let me know. I’m eager to get these resolved.

Eric

On Thu, Sep 4, 2014 at 5:20 PM, Debbie Peabody [bounce-Debbie\_Peabody@toadworld.com](mailto:bounce-Debbie_Peabody@toadworld.com) wrote:

**[ RE: In Automation, Export Wizard Doesn’t Pass DateTime Correctly, Throws “not a  
valid month” error](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48739.aspx#48739)**

Reply by Debbie Peabody

Eric, can you send export wizard template and details on what is occurring to me in private email and we will investigate.  
[debbie.peabody@quest.com](mailto:debbie.peabody@quest.com) Include connection type, version and screenshots of results along with the export template.

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/toad-data-point/f/36/t/22628.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad Data Point - General](http://www.toadworld.com/products/toad-data-point/f/36.aspx?subscribe=false) notifications altogether.

Toad Data Point - Discussion Forum

[Flag](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48739.aspx?AbuseContentId=147a21b6-f0df-4f05-bdd5-7cae78ab9030&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/o/04j0/0ec0545e/utn25hje.gif)

–

**Eric Chilenskas**

**Performance Data Specialist**

![](https://948b74a6bd23ca07e21be6bd021beca7787a8adf.googledrive.com/host/0B8gdupL6hOgVR3hrSHVLanVNaVU/images/co_cdhs_off_pso_dpm_72_rgb_email.png)

[Eric.Chilenskas@state.co.us](mailto:Eric.Chilenskas@state.co.us)

**Attachments:**

[Toad Data Point Bugs to Developers.docx](http://www.toadworld.com/cfs-file.ashx/__key/telligent-evolution-components-attachments/13-40-00-00-00-00-14-56/Toad-Data-Point-Bugs-to-Developers.docx)

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/toad-data-point/f/36/t/22628.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad Data Point - General](http://www.toadworld.com/products/toad-data-point/f/36.aspx?subscribe=false) notifications altogether.

Toad Data Point - Discussion Forum

[Flag](http://www.toadworld.com/products/toad-data-point/f/36/p/22628/48860.aspx?AbuseContentId=bd2e8d83-f9ae-4905-b37c-ff8be9738815&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/o/04j0/580ec8a2/uj4rqspe.gif)

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [September 12, 2014, 6:50pm UTC](https://forums.toadworld.com/t/in-automation-export-wizard-doesnt-pass-datetime-correctly-throws-not-a-valid-month-error/30774/16 "2014-09-12T18:50:33Z")

</div>

Issue #1: Change your variable type to SQL and execute this against Oracle:

select '''ALAMOSA'', ''BACA'', ''BENT''' country from dual;

This will "trick" the automation into behaving. I have entered QAT-3922 to fix in the future but it will not make the TDP 3.6 release.

 ![Workaround.png](https://global.discourse-cdn.com/quest/original/2X/1/1f87c2341ef002051eb044f1a52554de81e03434.png)

Issue #2:

Also use this same solution for binding the dates.

select to\_date('04/13/2013', 'MM/DD/YYYY')  
from dual

 ![var6.png](https://global.discourse-cdn.com/quest/original/2X/5/57598bf3f042082852c7217861ed7709f1e9a29c.png)

Issue #3:

Union all with two of same binds. In this case you trying to get around the issue in item one but you can't use the same variable and have different values. Use the work around given. I did enter QAT-3923 as we should not totally abbend in this case:)
