-Contains calculations that use fields from the current entity or related parent entities.
Single Line of Text, Option Set, Two Options, Whole Number, Decimal Number, Currency, Date and Time
To complement the Date Difference calculations in the Spring Release, there’s another function in Calculated Fields called “Now()”, which populates the current date/time value in a field or a formula. The Now() function is a little selective in how it interacts with another new concept also rolling out in the Spring Release: Behavior of date fields whose choices are User Local, Date Only, and Time-Zone Independent.
For our purposes, we’ll only delve into date field Behavior in asmuch as it interacts with the Now() function. Here are some things to keep in mind:
- As of publication time, you can only use Now() directly in a Date Difference formula if the Behavior of the date field is set to “User Local”
A Date Difference formula comparing a date field with User Local Behavior and Now() might look like this:
- You can’t directly use Now() in a formula where the other date field has a Behavior of Date Only, but if you create a new date field, set its Field Type to Calculated and its Behavior to Date Only…
…you can use the Now() function on its own to populate the field…
…and then use that field in a calculation.
- So far, the Now() function doesn’t work at all—either in a Date Difference formula or used on its own to populate a field—with date fields whose Behavior is Time-Zone Independent.