Skip to main content
Question

Date Formula Assistance

  • September 20, 2022
  • 0 replies
  • 71 views

Hello,

I'm once again reaching out to the amazing community of folks way smarter than me for some assistance creating a formula that is absolutely stumping me but probably child's play for the community wizards!

I've built an App for managing our fleet of vehicles - inclusive of Inspection Date tracking.

For the inspection date tracking, our trailers must be inspected twice each year and said inspections must be performed within specific date "windows". One inspection must occur each year between March 1 and April 30 and then performed again between August 1 and September 30. I need to create a formula that projects the next inspection date for a trailer by referencing the last inspection date. Let's call the two fields "Last Inspection" and "Next Inspection". Given that an inspection can occur on any date within the allowed "window" (March 1 and April 30 and then again between August 1 and September 30), I cannot simply add a fixed addition of days to the "Last Inspection" to populate the "Next Inspection" because it could fall outside of the next "window".

In other words, if a trailer's "Last Inspection" field is populated with a date between March 1 and April 30, the "Next Inspection" field must populate with a date between August 1 and September 30. For ease, it would be acceptable for the "Next Inspection" field to simply populate as August 1 in this case.

Same scenario if a trailer's "Last Inspection" field is populated with a date between August 1 and September 30, the "Next Inspection" field must populate with a date between March 1 and April 30. For ease, it would be acceptable for the "Next Inspection" field to simply populate as March 1 in this case.

Thanks in advance for any wisdom and assistance!


------------------------------
Eric Rovner
------------------------------
This topic has been closed for replies.

  • Quickbase Alumni
  • September 21, 2022
I may be misunderstanding the issue, but is there a reason you can't add a fixed number of months to the last inspection date? Meaning, if the last inspection date is between August 1 and September 30, add 7 months to the date to get your next inspection date (using the AdjustMonth() formula), and if the last inspection date is between March 1 and April 30, add 5 months.

------------------------------
Ahuva Brown
------------------------------