469,909 Members | 1,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

using timestamps in sql statements on DB2 tables

Hi ,
I am very new to DB2 and I am trying to extract some rows from a db2 table based on a field of timestamp datatype.

I am trying the following.
1) select * from test where add_tms ='08/03/2006 12:00:00 AM'
2) select * from test where add_tms>='07/02/2006 12:00:00 AM' and add_tms<='08/03/2006 12:00:00 AM'

both the sql statments dont work.

any help?
thanks in advance
Aug 4 '06 #1
2 1495
4,258 Expert 4TB
Are you certain that the date/time was originally stored as '08/03/2006 12:00:00 AM' in the database and not as '08/03/2006 12:00:00'?

Ronald :cool:
Aug 4 '06 #2
When I do a select * from the table,thats what it displays.
Aug 4 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by lkrubner | last post: by
4 posts views Thread by Craig G | last post: by
3 posts views Thread by rAinDeEr | last post: by
6 posts views Thread by Brandon | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.