How to automatically have accessed date when importing refs from database?

Many years later, and in the age of AI I came up with a solution this evening