6 Replies Latest reply: Jan 21, 2016 5:40 AM by Alex Bjølig RSS

    Find closest date

    Alex Bjølig

      Ok I have this frustrating task I hope you can help solve:

      Known informatoin:


      Startdate (presented by red star)

      Enddate (presented by the lightning) --> its the startdate + 18 months

      Event dates: 1 march and 1 september, every year.


      Given any startdate, how do I find the closest future event date?


      I created a small picture for visualization:



      What I have tried so far:


      Lightningdate = AddMonths(Startdate, 18)