Have you tried using the DateDiff() function ?
e.g.
rs.open "SELECT * FROM nm_feedback where (DATEDIFF("ww",now(),vDob) MOD 52) = 1 ORDER BY " &tbl_name&order,objConn,0,2
Quote:
|
Originally Posted by traceMe
iam storing birthdates of people as datetime format in the db and now i need to compare the date and get a list that shows me one week before the birthdate
as in my current query is :
rs.open "select * from nm_feedback where not month(vDob)>'"&month(date)&"' order by "&tbl_name&order,objConn,0,2
but then this fetches me with all the dates in db thats greater than current month now the real scene comes in
i want a list that shows me list of birthdays 1 week or one month in the sence if a birth day is on 1apr then i should see it on say 23march prior to the particular birthday. i could have got it if the year was same but the scene is year is lesser than current date year
i have been comparing the days with current date so i guess its a prop
thx for help
iam online in msn!
|