# Adhoc trend template runtime error

**URL:** <https://forum.inductiveautomation.com/t/adhoc-trend-template-runtime-error/33135>\
**Category:** Ignition\
**Created:** [March 16, 2020, 6:25pm UTC](https://forum.inductiveautomation.com/t/adhoc-trend-template-runtime-error/33135 "2020-03-16T18:25:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [March 16, 2020, 6:25pm UTC](https://forum.inductiveautomation.com/t/adhoc-trend-template-runtime-error/33135/1 "2020-03-16T18:25:42Z")

</div>

hello,  
i’m using AdHoc Trend template in my project.  
I have already created the database, and it works correctly, but when I change to runtime mode it gives me the following error every moment.

Exception: Error running query:  
SQLQuery(query=SELECT  
id,  
penname,  
xvalue,  
yvalue  
FROM  
chart\_annotations  
WHERE  
xvalue BETWEEN ‘2020-03-16 19:16:56.535’ AND ‘’

ORDER BY  
xvalue ASC, penname ASC, database=)@0ms  
On: AdHoc Trend.AdHoc Trend.Annotation Container.Annotations.data  
caused by GatewayException: ERROR: invalid input syntax for type timestamp: “”  
Position: 120  
caused by PSQLException: ERROR: invalid input syntax for type timestamp: “”  
Position: 120
