1. Knowledge Base
2. How-To Guides
3. Logic, Equations, & Formulas

# Show Upcoming Birthdays

### Requirements

If this is your first time creating an app, you'll need to know some basics about adding tables, fields, pages, and views. You can start by reading our Builder Basics section.
Other good resources can be found in our About Your Database and Working With Pages article in our knowledge base.

### Steps

#### Add a Date Field for the Birthday

1. Add a Date/Time field named "Birthday" to a table. We will use a Person table for this example.

2. Set the Field’s defaults to "none" and make the Field required.

#### Add an Equation Field for the Birthday Month

1. Add an Equation field named "Birthday Month".

2. Set the Equation Type to "Numeric" and leave the rest of the options as the defaults.

3. Use the following equation, which uses the function getDateMonth( ) and extracts the numeric month of the year: getDateMonth({Birthday}).

Your equation field should look like this:

You can read more about using equations and date functions with equations here.

#### Add an Equation Field for the Current Date

+
1. Add an Equation field named "Current Date".

2. Set the Equation Type to "Date", the Date Type to "days", and the Result Type to "Date". Leave the rest of the options as their defaults.

3. Use the following equation, which uses the function currentTime( ) and pulls in the current date, as shown in the image below.

Your Equation field should look like this:

#### Add an Equation Field for the Current Month

1. Add an Equation Field named "Current Month".

2. Set the Equation Type to "Numeric" and leave the rest of the options as the defaults.

3. Use the following equation, which uses the function getDateMonth( ) and extracts the numeric month of the year: getDateMonth({Current Date}).

Your Equation Field should look like this:

#### Add an Equation Field for the Next Month

1. Add an Equation Field named "Next Month".

2. Set the Equation Type to "Numeric" and leave the rest of the options as the defaults.

3. Use the following equation, which uses the function getDateMonth( ), extracts the numeric month of the year, and adds a value of +1 to the current date's month: getDateMonth({Current Date})+1.

Your Equation Field should look like this:

#### Add a Yes/No Field for Birthday in the Current Month

1. Add a Yes/No field named "Birthday" in Current Month.

2. Leave the default as "No" since the majority of birthdays would not be in the current month.

3. Add two conditional rules to this field so that when the birthday month is equal to the current month, the value is updated to "Yes".

• When "Every Record", Value Set "to a custom value" "No".

• When "Birthday Month" "is" "Current Month", Value Set "to a custom value" "Yes".

The conditional rules on your Yes/No field should look like this: #### Add a Yes/No Field for Birthday in Next Month

1. Add a Yes/No field called "Birthday" in Next Month.

2. Leave the default as "No" since the majority of birthdays would not be in the current month.

3. Add two conditional rules to this field so that when the birthday month is equal to the current month, the value is updated to "Yes".

• When "Every Record", Value Set "to a custom value" "No".

• When "Birthday Month" "is" "Next Month", Value Set "to a custom value" "Yes".

The conditional rules on your Yes/No field should look like this: