TripleJHJO
Programmer
I have a query that is using date range criteria entered by the user. However, I am getting dates that do not fall within the user input range. Below are the details:
SELECT invoice_date, Format([invoice_date],"mm/dd/yyyy") AS [Invoice Date]
FROM MyTable
WHERE (Format([invoice_date],"mm/dd/yyyy"))>=Format([Enter The Start Date (ex:mm/dd/yyyy)],"mm/dd/yyyy") And (Format([invoice_date],"mm/dd/yyyy"))<=Format([Enter The Ending Date (ex: mm/dd/yyyy)],"mm/dd/yyyy")
If I enter a start date of 09/01/2005 and an end date of 09/08/2005, I am getting dates, all in the 09/01 - 09/08 range, but the years are all over the map.
Is there a better way to do this?
Thanks,
J.Jensen
SELECT invoice_date, Format([invoice_date],"mm/dd/yyyy") AS [Invoice Date]
FROM MyTable
WHERE (Format([invoice_date],"mm/dd/yyyy"))>=Format([Enter The Start Date (ex:mm/dd/yyyy)],"mm/dd/yyyy") And (Format([invoice_date],"mm/dd/yyyy"))<=Format([Enter The Ending Date (ex: mm/dd/yyyy)],"mm/dd/yyyy")
If I enter a start date of 09/01/2005 and an end date of 09/08/2005, I am getting dates, all in the 09/01 - 09/08 range, but the years are all over the map.
Is there a better way to do this?
Thanks,
J.Jensen