Code: Select all
ALTER TABLE "Fanfics" ADD COLUMN "Timestamp" TIMESTAMP DEFAULT CURRENT_TIMESTAMP
But i have two minor things still to sort out. First, I'd like to set a different date for all of the records already in the database, as I'm not likely to remember today's date as well as, say, New Year's for this year (which is also valid for this purpose as I haven't added any new records to my main table since then, only modified them). I presume a single SQL command would work beautifully across all 960-ish records that I currently have.
Second, I need to be able to use the timestamp in my queries, so I can filter to only records added *after* a particular date, for instance. I don't care a whit about the time of day, only the date, but I gather that's not something I can turn off with timestamps, lol, but I'm likely to just be wanting the query to return any record added after a particular day of a particular year, often in combination with a much more complicated query.
A minor issue is adding a field to my form that will display the record creation timestamp for that record with only the date - and without being able to edit it - but that's low on my priority list, so if that's tricky, it can definitely wait.
And if there's a way to set the timestamp as only a date and skip the entire time of day part of things, I'd be happy to do that too, since I only need the date filtering and not time of day.
I'm wading through search results for SQL sites and forum threads and not finding anything that quite answers my questions, but it's possible I've missed something due to not knowing what to search for.