how to get current date, then have it NOT change

Copper Contributor

I receive excel files once a month (exports from other systems). To help me keep better track of these items from month to month, I want to import them into Access.

I know I can run a query that would add the current date to a table but is it possible to have that date never change?

or is there a function to add the date imported, then have that date set & never change?

3 Replies
if you include the Date() function in your query, it will be different on each day you import.
but you can use a Constant date, like #10/18/2022# (october 18, 2022) in your query.

I understand that maybe the way I asked was unclear. Sometimes I don't express correctly what's in my head.
Is there a way for Access to get the date that the excel data is imported/added? So that the date will never change. I'm trying to build it so when I run import, then the date that the data is imported, will be added without me going into the query and adding a static date.
I hope this is clearer...

You'll have to create a field to store that date, something like "DateImported" in the table where the data is stored. Then it will be saved as part of the import process if you use Date() in the import query to populate it. Similar to what Arnel suggested.