Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a query that pulls data based on a date range. The data that comes
out is correct based on the Month and Day values, however the year seems to not factor into the query. For instance, I am looking at dates from years 2005 and 2004. If my query looks for 06/01/2005 thru 07/01/2005, I receive results from 06/01 thru 07/01 from both 2004 and 2005. Here is what my query looks like: BeginDate = Format(Date, "mm/dd/yyyy") EndDate = Format(DateAdd("d", 14, BeginDate), "mm/dd/yyyy") SQL = "SELECT reqdate, Customer FROM [detail$] WHERE (reqdate = '" & _ BeginDate & "') AND (reqdate <= '" & EndDate & "') ORDER BY reqdate" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If a date range contains a leap year (date) | Excel Worksheet Functions | |||
compute count of range of date fields with a given year | Excel Discussion (Misc queries) | |||
Locate month n year from range of date | New Users to Excel | |||
Locate month and year from range of date from another sheet | New Users to Excel | |||
MS Query - STANDARD DATE to YEAR-MONTH | Excel Programming |