Date field query to find same ddmm in ddmmyyyy field

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

I would like to search our database to find whose
birthday it is on the current day.

Can anyone help?

Rob
 
Use this expression:
(Month([DOB] = Month(Date())) AND (Day([DOB] = Day(Date()))

The expression could go into the WHERE clause of a query, the Filter
property of a Form, or the WhereConditon of the OpenReport action.

The date format does not matter. However, since you are using dd/mm/yyyy
format, you may be interested in reading this article about how to avoid
problems with dates in Access:
http://allenbrowne.com/ser-36.html
 
Many thanks
-----Original Message-----
Use this expression:
(Month([DOB] = Month(Date())) AND (Day([DOB] = Day (Date()))

The expression could go into the WHERE clause of a query, the Filter
property of a Form, or the WhereConditon of the OpenReport action.

The date format does not matter. However, since you are using dd/mm/yyyy
format, you may be interested in reading this article about how to avoid
problems with dates in Access:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I would like to search our database to find whose
birthday it is on the current day.

Can anyone help?

Rob


.
 
Back
Top