472,145 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

using timestamps in sql statements on DB2 tables

2
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
sat
Aug 4 '06 #1
2 1543
ronverdonk
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
sat
2
Hi,
When I do a select * from the table,thats what it displays.
Thanks
Satish
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.