[thelist] SQL query help: dates
Anthony Baratta
Anthony at Baratta.com
Thu Feb 17 12:56:24 CST 2005
At 08:57 AM 2/17/2005, Shiok Far-eastern Cuisine wrote:
>I want to run a query that will return the names of customers whose
>birthdays fall in the 10 days from today. The name field is called
>CustomerName and the birthday field is called, well, Birthday.
Here's a little pseudo code...
dtNow = DateValue(Now()) & " 00:00:00"
dtThen = DateValue(Now() + 10) & " 23:59:59"
select CustomerName from tblCustomers
where birthday between "dtNow" and "dtThen"
More information about the thelist
mailing list