Re: TIMESTAMPADD Not working

168 views
Skip to first unread message

Thomas Mueller

unread,
Sep 21, 2012, 4:22:17 PM9/21/12
to h2-da...@googlegroups.com
Hi,

You are using an old version of H2 (1.3.149 Beta from 2011-01-07) where I believe this function is not supported yet. You need to use a more recent version of H2. And (not sure why) you need to use the keyword 'timestamp' so that the parser knows it's a timestamp:

select TIMESTAMPADD(SECOND, 7, current_timestamp()) > timestamp '2012-09-21 15:14:28.399'

Regards,
Thomas

On Fri, Sep 21, 2012 at 10:18 PM, karthik cherukuri <karthi...@gmail.com> wrote:
When i  try to use TIMESTAMPADD method in H2 DB (as MySQL supports the same), i am getting the below error. The same works fine in MySql

select TIMESTAMPADD(SECOND, 7,  current_timestamp()) > '2012-09-21 15:14:28.399';
Function "TIMESTAMPADD" not found; SQL statement:
select TIMESTAMPADD(SECOND, 7,  current_timestamp()) > '2012-09-21 15:14:28.399' [90022-149]
90022/90022 (Help)

Help please...

Thanks,
Karthik

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/nsV3EpIhBkwJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

karthik313

unread,
Sep 21, 2012, 4:29:38 PM9/21/12
to h2-da...@googlegroups.com
Hi Thomas,

Thank you for the response. The jar in my classpath is 'h2-1.3.149.jar' which i believe is the beta version. i will get the latest jar and try the functionality.

Regards,
Karthik
Reply all
Reply to author
Forward
0 new messages