puthenveetil
Registered User.
- Local time
- Today, 22:12
- Joined
- Aug 9, 2004
- Messages
- 94
Hi all,
In my db I had a table for students. I am using a report to view the age of the students. I want to list the name of the students who are 18 or more compared to the current date. The code which I am using now is
SELECT Recipients.Inst_Name, Recipients.Rec_First, Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1) AS age
FROM Recipients
WHERE (((Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1))=18 Or (Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1))>18))
ORDER BY Recipients.Rec_First;
i want to know whether this code is ok or If you had any idea about this please give me a solution
Thanks in adance
Thanks
In my db I had a table for students. I am using a report to view the age of the students. I want to list the name of the students who are 18 or more compared to the current date. The code which I am using now is
SELECT Recipients.Inst_Name, Recipients.Rec_First, Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1) AS age
FROM Recipients
WHERE (((Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1))=18 Or (Left((Now()-[dob])/365,InStr((Now()-[dob])/365,'.')-1))>18))
ORDER BY Recipients.Rec_First;
i want to know whether this code is ok or If you had any idea about this please give me a solution
Thanks in adance
Thanks