Skip to main content

Hey! 

I'm trying to figure out how to add a portion to a formula that would ensure that it's set for 90 days after a particular field, or before June 1st. The current formula pulls from a date field for when they registered (Date Registered), and adds 90 days. How would I add a restriction onto this formula so it's 90 days, or until June 1st? 

 

DATETIME_FORMAT(DATEADD({Date Registered}, 90, 'days'), 'MM/DD/YYYY')

Try this:

IF(
IS_AFTER(
DATEADD({Date Registered}, 90, 'days'),
DATETIME_PARSE(
'01062024',
'DDMMYYYY'
)
),
DATETIME_PARSE(
'01062024',
'DDMMYYYY'
),
DATEADD({Date Registered}, 90, 'days')
)

 Do note that the year for 1st June is hardcoded though.  We could make it take the current year into account, but that would mean that the previous year's records would be all weird you know what I mean?


Reply