Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Mass update with Date Field Formula
I'm trying to update a custom Date field in a Transaction record via a Mass Update formula.
This update looks at the creation time of the transaction, and creates a billing date based upon the time the order was placed.
CASE WHEN (to_char({datecreated},'HH24') < ’12') THEN (to_char({datecreated}+5, 'DD-Mon-YYYY’)) WHEN (to_char({datecreated},'HH24') > '11') AND (to_char({datecreated},'HH24') < '18') THEN (to_char({datecreated}+7, 'DD-Mon-YYYY’)) WHEN (to_char({datecreated},'HH24') > ’18') THEN (to_char({datecreated}+7, 'DD-Mon-YYYY’)) END
In this example, if the order was placed before noon, the billing date is 5 days away, if it's between noon and 6pm or after 6pm the billing date is 7 days away.