LuLi155 wrote:
…but it removes the original date and saves it as the date and time of the import. Is there a way of keeping this data?
The file system metadata including the file dates is not your metadata. It’s the file system’s metadata to maintain and alter as the file system chooses. The file system metadata is not particularly reliable for the creation of a photo management tool.
Contrast the difficulty of file system metadata with the metadata stored in the Exif data that is associated with the photos, as the Exif metadata much more reliable, and can be customized. Including adding your own photo data or database-related tags or such, to better integrate with your own custom photo library app, and to better support library rebuilds and such should those become necessary, too.
Are the proper photo dates stored in and preserved in the per-photo Exif metadata?
There are various ways to access and maintain and modify the EXIF data, and one of the available third-party tools here is exiftools.
Spotlight also indexes the Exif data.
I’d also suggest generating the filenames to be used, as the filenames generated from the cameras can and probably will eventually collide, and these filename collisions can happen at the most inopportune times.
I’d also suggest either using the Apple Photos library, or sourcing an existing photo management library. That if your overarching goal is photos and related tasks, and not creating and extending and supporting some custom database package. (But if you do want to create a photo management tool, by all means have at. Maybe also look at using FileMaker Pro as part of creating your custom database app; to help ease some of the effort involved.)