# Toad Script Runner results missing time

**URL:** <https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [August 5, 2017, 2:27am UTC](https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811 "2017-08-05T02:27:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kodiak\_kid](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kodiak\_kid](https://forums.toadworld.com/u/kodiak_kid)\
**Post date:** [August 5, 2017, 2:27am UTC](https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811/1 "2017-08-05T02:27:54Z")

</div>

Hi all,

total newb here, but I did search and it looks like this format is correct. I get all of the data I need except for the time. I get the date, but I also need the time. Am I missing something here? Thanks in advance!

SELECT TIME, batch\_number, P17, P18

from lmes.V\_BATCHENDDATA\_12GD

where cell like ‘%12GD%’ and P18 = ‘Eval’ and TIME between TO\_DATE(‘07/18/2017 11:59:00 PM’ , ‘MM/DD/YYYY HH:MI:SS AM’) and TO\_DATE(‘08/01/2017 11:59:59 PM’ , ‘MM/DD/YYYY HH:MI:SS AM’);

---

<div class="post-metadata">

**Author:** ![markmolnar](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@markmolnar](https://forums.toadworld.com/u/markmolnar)\
**Post date:** [August 5, 2017, 12:47pm UTC](https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811/2 "2017-08-05T12:47:09Z")

</div>

Looks like your “TIME” column is defined as a “DATE”, which is fine.

Based on the default date format you will typically only get the date portion of the date/time field. Instead, wrap the TIME column with a to\_char, like this:

SELECT to\_char(TIME, ‘MM/DD/YYYY HH:MI:SS AM’) my\_time\_as\_char, batch\_number, P17, P18

etc….

Best, MM

**From:** kodiak\_kid [[mailto:bounce-kodiak\_kid@toadworld.com](mailto:bounce-kodiak_kid@toadworld.com)]  
**Sent:** Saturday, August 05, 2017 12:24 PM  
**To:** [toadoracle@toadworld.com](mailto:toadoracle@toadworld.com)  
**Subject:** [Toad for Oracle - Discussion Forum] Toad Script Runner results missing time

**[Toad Script Runner results missing time](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161)**

Thread created by kodiak\_kid

Hi all,

total newb here, but I did search and it looks like this format is correct. I get all of the data I need except for the time. I get the date, but I also need the time. Am I missing something here? Thanks in advance!

SELECT TIME, batch\_number, P17, P18

from lmes.V\_BATCHENDDATA\_12GD

where cell like ‘%12GD%’ and P18 = ‘Eval’ and TIME between TO\_DATE(‘07/18/2017 11:59:00 PM’ , ‘MM/DD/YYYY HH:MI:SS AM’) and TO\_DATE(‘08/01/2017 11:59:59 PM’ , ‘MM/DD/YYYY HH:MI:SS AM’);

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161?subscribe=false) on this subject.  
Or [Unsubscribe from Toad for Oracle Forum](http://www.toadworld.com/products/toad-for-oracle/f/10?subscribe=false) notifications altogether.  
Toad for Oracle - Discussion Forum

[Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161?AbuseContentId=91530b3b-9b18-47af-ae5e-c1ae5d8abe09&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true) this post as spam/abuse.

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [August 6, 2017, 11:35pm UTC](https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811/3 "2017-08-06T23:35:04Z")

</div>

i would strongly advise you to not use reserved words as your custom names. put “A\_” or noun plural but avoid to use reserved words.

---

<div class="post-metadata">

**Author:** ![gene.l.bradley](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gene.l.bradley](https://forums.toadworld.com/u/gene.l.bradley)\
**Post date:** [August 7, 2017, 7:03am UTC](https://forums.toadworld.com/t/toad-script-runner-results-missing-time/39811/4 "2017-08-07T07:03:51Z")

</div>

Yes, you were advised to wrap the time column as to\_char(TIME,'MM/DD/YYYY HH:MI:SS')

On Aug 5, 2017 1:24 PM, "kodiak\_kid" [bounce-kodiak\_kid@toadworld.com](mailto:bounce-kodiak_kid@toadworld.com) wrote:

> **[Toad Script Runner results missing time](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161)**

> Thread created by kodiak\_kid  
> Hi all,

> total newb here, but I did search and it looks like this format is correct. I get all of the data I need except for the time. I get the date, but I also need the time. Am I missing something here? Thanks in advance!

> SELECT TIME, batch\_number, P17, P18

> from lmes.V\_BATCHENDDATA\_12GD

> where cell like '%12GD%' and P18 = 'Eval' and TIME between TO\_DATE('07/18/2017 11:59:00 PM' , 'MM/DD/YYYY HH:MI:SS AM') and TO\_DATE('08/01/2017 11:59:59 PM' , 'MM/DD/YYYY HH:MI:SS AM');

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad for Oracle Forum](http://www.toadworld.com/products/toad-for-oracle/f/10?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/t/34161?AbuseContentId=91530b3b-9b18-47af-ae5e-c1ae5d8abe09&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true) this post as spam/abuse.
