Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / October 2008

Tip: Looking for answers? Try searching our database.

remove year from birthday

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
frankd - 02 Sep 2005 19:55 GMT
I have a short date field, BIRTHDAY, with the input mask of 99/99/00;0, in
table CONTACTS.  I would like to remove the year and then sort the birthdays
by month and day via a query to mail merge with MS Word to send out birthday
cards.  I am willing to go into the query on a monthly basis asking
specifically for birthdays that month.  Your help will be greatly
appreciated.  
Rick B - 02 Sep 2005 20:02 GMT
First, you don't have to modify the query each month, just make the month of
the birthdate equal to the month of the current date (or next month or
whatever)

=Month(date())

To do what you want, format the field...
BirthdateRevised: Format([birthdate],"mm/dd")

Signature

Rick B

> I have a short date field, BIRTHDAY, with the input mask of 99/99/00;0, in
> table CONTACTS.  I would like to remove the year and then sort the birthdays
> by month and day via a query to mail merge with MS Word to send out birthday
> cards.  I am willing to go into the query on a monthly basis asking
> specifically for birthdays that month.  Your help will be greatly
> appreciated.
frankd - 02 Sep 2005 20:53 GMT
Rick, WONDERFUL and thank you.  May I push for another level?  I believe the
greeting would look more professional reading "September 3" as compared to
"09/03."  Would you please help me convert it to the month spelled out and
date?  Your answer was in a fraction of the time I spent searching in how to
do this.  
Respectfully, Frank

> First, you don't have to modify the query each month, just make the month of
> the birthdate equal to the month of the current date (or next month or
[quoted text clipped - 13 lines]
> > specifically for birthdays that month.  Your help will be greatly
> > appreciated.
Rick B - 02 Sep 2005 20:56 GMT
I believe that would be:

BirthdateRevised: Format([birthdate],"mmmm dd")

Signature

Rick B

> Rick, WONDERFUL and thank you.  May I push for another level?  I believe the
> greeting would look more professional reading "September 3" as compared to
[quoted text clipped - 20 lines]
> > > specifically for birthdays that month.  Your help will be greatly
> > > appreciated.
frankd - 02 Sep 2005 21:08 GMT
MR. Rick B:  THANK YOU very much for your time and assistance.   Have a
pleasant day; I will now! Frank

> I believe that would be:
>
[quoted text clipped - 28 lines]
> > > > specifically for birthdays that month.  Your help will be greatly
> > > > appreciated.
Steve Schapel - 03 Sep 2005 00:57 GMT
Or, to be totally precise...
 BirthdateRevised: Format([birthdate],"mmmm d")
 :-)

Signature

Steve Schapel, Microsoft Access MVP

> I believe that would be:
>
> BirthdateRevised: Format([birthdate],"mmmm dd")
Bob''s Wife - 10 Sep 2008 19:38 GMT
So how can I sort my table?  I was able to remove the year doing what you
said, but now it will not let me sort the table so I see the birthdays in
chronological order.  And the year in the birthday field is what causes them
to sort improperly.

> First, you don't have to modify the query each month, just make the month of
> the birthdate equal to the month of the current date (or next month or
[quoted text clipped - 13 lines]
> > specifically for birthdays that month.  Your help will be greatly
> > appreciated.
Douglas J. Steele - 10 Sep 2008 20:02 GMT
Did you add the BirthdateRevised field to your query like Rick suggested?
Sort on that field, not the birthdate.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> So how can I sort my table?  I was able to remove the year doing what you
> said, but now it will not let me sort the table so I see the birthdays in
[quoted text clipped - 21 lines]
>> > specifically for birthdays that month.  Your help will be greatly
>> > appreciated.
Mary - 03 Oct 2008 20:36 GMT
I added the following to my query:
(In an empty field:)   BirthdateRevised: Format([BirthDate],"mm/d")
(Criteria:)                 Between [Enter start date:] And [Enter end date:]

If I query 10/3 (start date) to 10/5 (end date) then in addition to 10/3,
10/4 and 10/5  it returns all dates starting with 10/3 such as 10/30 and
10/31

If I query 10/1 (start date) to 10/3 (enddate) then in addition to 10/1,
10/2 and 10/3 it returns all dates beginning with 10/1, 10/2, or 10/3 such as
10/1, 10/10, 10/11, 10/12, 10/13...  10/20, 10/21...  10/30, 10/31 etc.

Is there a fix for this?

> Did you add the BirthdateRevised field to your query like Rick suggested?
> Sort on that field, not the birthdate.
[quoted text clipped - 24 lines]
> >> > specifically for birthdays that month.  Your help will be greatly
> >> > appreciated.
Douglas J. Steele - 04 Oct 2008 13:16 GMT
Use Format([BirthDate],"mm/dd"), and use preceding zeroes, so that you enter
10/03 and 10/05, not 10/3 and 10/5.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I added the following to my query:
> (In an empty field:)   BirthdateRevised: Format([BirthDate],"mm/d")
[quoted text clipped - 44 lines]
>> >> > specifically for birthdays that month.  Your help will be greatly
>> >> > appreciated.
Mary - 06 Oct 2008 20:45 GMT
Worked like a charm.  Thank you very much!

> Use Format([BirthDate],"mm/dd"), and use preceding zeroes, so that you enter
> 10/03 and 10/05, not 10/3 and 10/5.
[quoted text clipped - 47 lines]
> >> >> > specifically for birthdays that month.  Your help will be greatly
> >> >> > appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.