Select to view content in your preferred language

How do we calculate next inspection in 12 months but not to exceed15 months before the next calendar year?

342
2
10-31-2024 08:24 AM
neomapper
Frequent Contributor

How do we calculate next inspection in 12 months but not to exceed15 months before the next calendar year? 

0 Kudos
2 Replies
clt_cabq
Frequent Contributor

I use this expression in the calculation field to set a follow-up inspection 90 days from the date of the current inspection. I imagine you could include logic to calculate the date to be at least 12 months, but less than 15. If you do this to account for an inspection date of 12 months from *now* do you need to worry about the 15 months concern, I'm a little unclear what you mean by that. 

date(decimal-date-time(now())+90)

 

0 Kudos
abureaux
MVP Frequent Contributor

Are you asking how someone can select a date from a dropdown, but have that date be within that range? Then you need to utilize the "constraint" column, and calculate the upper and lower limits of your constraint (in this case, the date range), and ensure the date that is selected is within that range (e.g., ${new_date}>=${lower_limit} and ${new_date}<=${upper_limit})

Everything on dates in S123 is here: Dates and Time in Survey123

0 Kudos