I am scripting my astronomy observatory, Carbox makes slewing a telescope to objects, start pictures, and stores them.
Works wonderfully (as usual, everything seems possible with Cardbox, my basic use is running my Patient files in my medical practice since 20 years)
To keep pictures stored by date, the date should not change at 24H midnight, but at 12H, at noon... avoiding pictures of one night to be stored in two directories.
If i make a macro:
Fields("ASTRODATE")=DateAdd("h",-12,Fields("DATE")) it does not work, however +24 changes one day..
We start the telescope, read the coordinates of a galaxy, set the date, take a picture and store it. If there is a supernova, the differences in the images will tell. So images should have the same name, but should be in a directory that is created , based on the date. As imaging will take hours, the date will change during the night.
the records are validated to today as soon as read, so a group of selected records will have the same date (except when the script continues after midnight). To easily store new directories, the date is stored in the format: "le 21 août 2011" , but i can convert the date and keep it in another field if needed. In principle, all records have the same date-format.
The macro could in the beginning set the whole selection to the actual date, to keep all images together, but that would give a problem if one night we start at 01H00 and next night we start at 23H00 !