Using CMS to moderate Upcoming and Past Events?

Question:
I currently have events displayed using 2 CMS collections. 1> upcoming events 2> past events. How can I keep using CMS to display, but automate the movement from Upcoming to Past?

Product:
Wix Studio CMS

What are you trying to achieve:
Webpage has 2 event areas, upcoming and past. Both use easy to enter CMS data, but I need to have upcoming automatically become past when the dates come and go. I don’t have time to constantly monitor, would appreciate either a different app or way to use CMS correctly.

What have you already tried:
Nothing appears to work. I tried using Visibility, but I don’t write code so I can’t write manual code, trying to find an easy solution.

Additional information:
It would be great if I could combine both elements into one CMS and understand how to use the same Dataset in two different areas, that way one can easily switch from Upcoming to Past?

If you do not want to code.
You could create a database that stores all events, Dates, times, Locations, whatever, and a booleen “past event” to check.

then on the page link your database. populate the fields on a repeater and then add a filter that is the booleen is not true.

would only need a small amount of code to get it to work. Combine all data into 1 collection and add something like this

import wixData from 'wix-data';

$w.onReady(function () {
  const today = new Date();

  // Filter for Upcoming Events
  $w("#upcomingDataset").setFilter(
    wixData.filter()
      .ge("eventDate", today) // greater than or equal to today
  );

  // Filter for Past Events
  $w("#pastDataset").setFilter(
    wixData.filter()
      .lt("eventDate", today) // less than today
  );
});