If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Birthday Date
I have a table that has the Date of Birth field that is set as a text field
that is formated 99/99/00;;_ I need to create a query that returns anyone whos birth month is equal to the current month. Can anyone help? |
#2
|
|||
|
|||
Birthday Date
Why are you carrying a date as text? That only makes life harder for you.
There is not advantage to carrying a date as text. But, to answer your question, assuming the actual field content is in mmddyy order and today would be represented as 072309, you can use this WHERE CLng(Left([DOB],2)) = Month(Date) If you are using an international format of ddmmyy (230709) It would be WHERE Clng(Mid([DOB],3,2)) = Month(Date) And if you were doing it correctly, it would be WHERE Month([DOB]) = Month(Date) -- Dave Hargis, Microsoft Access MVP "john" wrote: I have a table that has the Date of Birth field that is set as a text field that is formated 99/99/00;;_ I need to create a query that returns anyone whos birth month is equal to the current month. Can anyone help? |
Thread Tools | |
Display Modes | |
|
|