Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
neil_akoga
Yak Posting Veteran
56 Posts |
Posted - 2010-04-13 : 07:46:02
|
ok, I'm not really an access person but here's my date range comparison. it's working for months but not years - anyone got any ideas?"SELECT orderNum, orderDate, bName, bCompany, orderStatus FROM tblOrderAddr WHERE (format(orderDate, 'mm/dd/yyyy hh:min:ss') >= format(" & date1 & ", 'mm/dd/yyyy hh:min:ss')) AND (format(orderDate, 'mm/dd/yyyy hh:min:ss') <= format(" & date2 & ", 'mm/dd/yyyy hh:min:ss')) and orderStatus <> 'Completed'"date1 and date2 are strings i pass in and they look like this if i'm searching for something from april 2010#04/01/2010# #04/30/2010# |
|
|
|
|