By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,398 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,398 IT Pros & Developers. It's quick & easy.

Sorting dates without yeats to get a birthday list?

P: n/a
Hi

I have a personal database of all adresses etceteras of personal contacts
and want to sort the birthday dates in such a way that I have a
chronological list for this years birthdays. The problem I now encounter is
that the system takes the years into account.

I already was thinking of exporting to outlook to get this done, but I think
there must be a smarter way

Can anyone help me out of this problem.? Thanks in advance.
Edwin
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
No Outlook required!!!

Very simple. Create a query.

SELECT Person.FName, Person.LName, Birthday AS
DateSerial(Year(Date),Month(Birthdate),Day(Birthda te))
FROM Person
ORDER BY Birthday;

check out DateSerial in the help. (I may be slightly off in my syntax,
but the basic idea is to calculate the date of the birthday in the
current year and sort by that.)

Nov 13 '05 #2

P: n/a
That would be

SELECT Person.FName, Person.LName,
DateSerial(Year(Date),Month(Birthdate),Day(Birthda te)) AS Birthday
FROM Person
ORDER BY DateSerial(Year(Date),Month(Birthdate),Day(Birthda te))

Unfortunately, you have to repeat the calculation: you can't just refer to
the field you created.

Another alternative would be:

SELECT Person.FName, Person.LName,
Format([Birthdate], "mmdd") AS Birthday
FROM Person
ORDER BY Format([Birthdate], "mmdd")

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

<pi********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
No Outlook required!!!

Very simple. Create a query.

SELECT Person.FName, Person.LName, Birthday AS
DateSerial(Year(Date),Month(Birthdate),Day(Birthda te))
FROM Person
ORDER BY Birthday;

check out DateSerial in the help. (I may be slightly off in my syntax,
but the basic idea is to calculate the date of the birthday in the
current year and sort by that.)

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.