Jump to content

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

Recommended Posts

Posted

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

Posted

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))

Posted

Well I did NOT know that ... thanks for the heads up.

I am assuming then that any calculation can be made boolean by adding

, 1 , 0

at the end of the statement.

Posted

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.

  • 3 months later...
Posted

In version 7 it's Get ( CurrentDate ), or in this case:

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

All the Status() functions are now Get() functions.

This topic is 7482 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.