Jump to content

Is Today someones birthday? Send them an email.


This topic is 7061 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Trolling the forum today I found some helpful things regarding Birthday Calculations.

I thought I would post the fruit sof my labors.

Here is a calculation field that will return a 1 if today matches the month and day in the DOB field.

If today does not match then it returns a zero.

Note: that I use the Status(CurrentDate) for the Month(date) and Day(Date) funtions.

If((Month(DOB) &"/"& Day(DOB))=(Month(Status(CurrentDate)) &"/"& Day(Status(CurrentDate))),1,0)

I am going to use this calculation field in a daily script that will run using Oazium Events that will look for all people who have a birthday today and send them an email wishing them a happy birthday.

hope this inspires someone to greatness.

the ohio bloke

Link to comment
Share on other sites

You don't need an If( ), by the way, since the test results in a boolean.

Month(DOB) & "/" & Day(DOB) = Month(Status(CurrentDate)) & "/" & Day(Status(CurrentDate))

Link to comment
Share on other sites

In general, if you have an If or Case statement with "1, 0" at the end, then it is redundant and you can remove the statement and leave the test because it results in either true or false (1 or 0).

If you want to go the other way around, i.e. "0, 1", prepending a simple "not" to the test will do the trick.

Link to comment
Share on other sites

  • 3 months later...

This topic is 7061 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.