-
sybase between date query
Here is my problem I have a database that I am trying to query to find dates that are between a range. I am querying a field that has a datetime datatype. I can't figure out the right syntax that will produce records. The field I am querying is in the following format:
10/23/1997 6:55:55 AM
Here are some of the queries I have tried
select * from sumstaff where txn_date between '#10/23/1997 6:55:55 AM#' and '#11/23/1997 6:55:55 AM#' "
select * from sumstaff where txn_date between '%10/23/1997 6:55:55 AM%' and '%11/23/1997 6:55:55 AM%' "
The above queries don't produce any errors but they don't produce any records either. I have looked at the table and the data is there. Any help would be greatly appreciated. Thanks... BJK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|