Create Custom Day Fields

Merge fields that pick a future date

Matt Alegria avatar
Written by Matt Alegria
Updated over a week ago

Many customers want to pull in a custom day, day of the week, or a date x number of days into the future by using merge fields. This is possible by creating custom fields on the Contact and Lead objects that will calculate the proper value based on the current day. Extra information on working with Days and Dates in Salesforce can be found here.

30 Days From Today

To create a field that simply returns a date 30 days from today, create a custom Formula field that returns the type 'Date' and call it "Today+30". Then, insert the formula below to calculate the value.

Today() + 30

Day of the Week

To create a field that simply returns the day of the week, Sunday - Saturday, create a custom Formula field that returns the type 'text' and call it "Today". Then, insert the formula below to calculate the value.

Case(MOD(Today()-DATE(1900,1,7),7),0,"Sunday",1,"Monday",2,"Tuesday",3,"Wednesday",4,"Thursday",5, "Friday",6,"Saturday", "Unknown")

Today +1 Day

To create a field that returns something like Today+1 (weekdays only), follow the steps below. This logic will give you the following results: If today is Wednesday for example, Today+1 will be Thursday. If today is Friday, Today+1 will be Next Monday, as it is the next business day. If today is Saturday, Today+1 will be Next Monday, as it is the next business day.

  1. Create a Today field as noted above.

  2. Create a separate field to use for your custom Today+1 field. It will also be a Formula field that returns the type 'text'. Populate the formula with the value below:

IF(Today__c = "Sunday", "Monday", IF(Today__c = "Monday", "Tuesday", IF(Today__c = "Tuesday", "Wednesday", IF(Today__c = "Wednesday", "Thursday", IF(Today__c = "Thursday", "Friday", IF(Today__c = "Friday", "Next Monday", IF(Today__c = "Saturday", "Next Monday", "Unknown")))))))

Today +2 Days

To create a field that returns something like Today+2 (weekdays only), follow the steps below. This logic will give you the following results: If today is Wednesday for example, Today+2 will be Friday. If today is Friday, Today+2 will be Next Tuesday, as it is the second next business day. If today is Saturday, Today+2 will be Next Tuesday, as it is the second next business day.

  1. Create a Today field as noted above.

  2. Create a separate field to use for your custom Today+2 field. It will also be a Formula field that returns the type 'text'. Populate the formula with the value below:

IF(Today__c = "Sunday", "Tuesday", IF(Today__c = "Monday", "Wednesday", IF(Today__c = "Tuesday", "Thursday", IF(Today__c = "Wednesday", "Friday", IF(Today__c = "Thursday", "Next Monday", IF(Today__c = "Friday", "Next Tuesday", IF(Today__c = "Saturday", "Next Tuesday", "Unknown")))))))

Did this answer your question?