Hi
Im want to compare records in a database, which have a value dd/mm/yyyy (set to a variable : DateLogged )in one field, in a query for matches from the last 2 weeks additions (a date is genetaed on the date of an addition)
I was thinking : sql="SELECT * FROM stock WHERE DateLogged BETWEEN '%" &date1& "%' AND '%" &date2& "%' AND InStock = 'Yes' ORDER BY Artist, Title, Label"
How do i set the values for date1 and date2 variables (which i want to cover a 2 week range,... am i along the right lines, or will the BETWEEN function not work with date comparisons
Thanks in adavance
Dave
Im want to compare records in a database, which have a value dd/mm/yyyy (set to a variable : DateLogged )in one field, in a query for matches from the last 2 weeks additions (a date is genetaed on the date of an addition)
I was thinking : sql="SELECT * FROM stock WHERE DateLogged BETWEEN '%" &date1& "%' AND '%" &date2& "%' AND InStock = 'Yes' ORDER BY Artist, Title, Label"
How do i set the values for date1 and date2 variables (which i want to cover a 2 week range,... am i along the right lines, or will the BETWEEN function not work with date comparisons
Thanks in adavance
Dave