Age calculation

G

Guest

Hi all,

I am designing a database for a photographer and for each client I have a
table that will list family anniversaries (wedding, birthdays). For marketing
purposes I would like to have 3 months advance warning of an anniversary.

For example, how would I find out now that someone will be celebrating there
40th anniversary in 3 months time.

My field is in "short" date/time format and is called "anniv"

cheers!
 
G

Guest

Hello

thanks for the reply but this is not quite what I want because it would
provide information for any day in the next thirty days. I suppose I could
adapt the following line to say is equal to now()+90

WHERE ((([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25)) Between
Now() And Now()+30));

Can you confirm the correct code?

thanks
 
G

Guest

Yes, it should work.
When I tried it I used the DateAdd function

WHERE DateAdd("d",((Int((Now()-[birthdate])/365.25)+1)*365.25) ,
[Birthdate]) Between Now() And Now()+90));

--
Good Luck
BS"D


scubadiver said:
Hello

thanks for the reply but this is not quite what I want because it would
provide information for any day in the next thirty days. I suppose I could
adapt the following line to say is equal to now()+90

WHERE ((([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25)) Between
Now() And Now()+30));

Can you confirm the correct code?

thanks

Ofer Cohen said:
Check this link on "Selecting birthdays within the next 30 days using a
Microsoft Access Query", change it from 1 month to 3

http://www.databasedev.co.uk/select_birthday.html
 
G

Guest

Hi,

I think I may have come up with a solution:

Between Now()+60 And Now()+90

The "next birthday" column isn't formatted for "short date"

NextBirthday: ([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25))



Ofer Cohen said:
Yes, it should work.
When I tried it I used the DateAdd function

WHERE DateAdd("d",((Int((Now()-[birthdate])/365.25)+1)*365.25) ,
[Birthdate]) Between Now() And Now()+90));

--
Good Luck
BS"D


scubadiver said:
Hello

thanks for the reply but this is not quite what I want because it would
provide information for any day in the next thirty days. I suppose I could
adapt the following line to say is equal to now()+90

WHERE ((([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25)) Between
Now() And Now()+30));

Can you confirm the correct code?

thanks

Ofer Cohen said:
Check this link on "Selecting birthdays within the next 30 days using a
Microsoft Access Query", change it from 1 month to 3

http://www.databasedev.co.uk/select_birthday.html
--
Good Luck
BS"D


:


Hi all,

I am designing a database for a photographer and for each client I have a
table that will list family anniversaries (wedding, birthdays). For marketing
purposes I would like to have 3 months advance warning of an anniversary.

For example, how would I find out now that someone will be celebrating there
40th anniversary in 3 months time.

My field is in "short" date/time format and is called "anniv"

cheers!
 
G

Guest

I've sorted it out. I created a new column.

thanks

Ofer Cohen said:
Yes, it should work.
When I tried it I used the DateAdd function

WHERE DateAdd("d",((Int((Now()-[birthdate])/365.25)+1)*365.25) ,
[Birthdate]) Between Now() And Now()+90));

--
Good Luck
BS"D


scubadiver said:
Hello

thanks for the reply but this is not quite what I want because it would
provide information for any day in the next thirty days. I suppose I could
adapt the following line to say is equal to now()+90

WHERE ((([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25)) Between
Now() And Now()+30));

Can you confirm the correct code?

thanks

Ofer Cohen said:
Check this link on "Selecting birthdays within the next 30 days using a
Microsoft Access Query", change it from 1 month to 3

http://www.databasedev.co.uk/select_birthday.html
--
Good Luck
BS"D


:


Hi all,

I am designing a database for a photographer and for each client I have a
table that will list family anniversaries (wedding, birthdays). For marketing
purposes I would like to have 3 months advance warning of an anniversary.

For example, how would I find out now that someone will be celebrating there
40th anniversary in 3 months time.

My field is in "short" date/time format and is called "anniv"

cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top