title: Find recent date of cyclical event
body: <p>Let's suppose that some event started on 1st January 2000 and is repeated every 36 hours and 45 minutes.</p>
  
  <p>At this moment at my place it is 4th April 2018 18:30.</p>
  
  <p>How could I calculate in SQL</p>
  
  <ul>
  <li><p>date and time of last recent happening of my event</p></li>
  <li><p>date and time of next future happening of my event ?</p></li>
  </ul>
  
  <p>My first idea was adding my period in a loop to a start date until required date is reached but that would be very ineffective with longer time spans, I believe </p>
  
  <p>Thank you for any help.</p>