More than one date is associated with each photo file:
- in metadata —
[EXIF:IFD0] ModifyDate
[EXIF:ExifIFD] DateTimeOriginal
[EXIF:ExifIFD] CreateDate
- on Microsoft Windows —
[File:System] FileModifyDate
[File:System] FileAccessDate
[File:System] FileCreateDate
- on Linux —
[File:System] FileModifyDate
[File:System] FileAccessDate
[File:System] FileInodeChangeDate
- and more in metadata —
[IPTC] DateCreated
[IPTC] TimeCreated
[EXIF:ExifIFD] SubSecTimeOriginal
[EXIF:ExifIFD] SubSecTimeDigitized
[EXIF:GPS] GPSTimeStamp
[EXIF:GPS] GPSDateStamp
[XMP:XMP-xmp] CreateDate
…
:and file system dates may change when a file is copied or moved between computers. So it isn't too surprising when computer programs show different dates for a photo.
In particular, note that [File:System] FileCreateDate
is available on Microsoft Windows but not available on Linux — so perhaps FileCreateDate is simply not available to Google Photos. When Google Photos does not show the date we expect, we need to make more data available before we upload.
These details are for Microsoft Windows, the details will be slightly different for other computers.
The Tools:
- Command Prompt aka Terminal
- ExifTool — download this amazingly wonderful photo software
The Steps:
- Check which dates are associated with a photo file
- Check which date Google Photos will choose
- Add CreateDate to metadata
- Add DateTimeOriginal to metadata
- Upload the photo files to Google Photos
The Steps in laborious detail:
Check which dates are associated with a photo file
- Open a command prompt.
- Change directory at the command prompt to a folder of photo files uploaded to Google Photos.
- Choose one of those photo files that Google Photos does not show with the date you expect.
- Use the following exiftool command, at the command prompt, to look at the dates associated with
a.jpg
—exiftool -s -a -G0:1 -time:all a.jpg
[File:System] FileModifyDate : 2018:03:15 09:51:34-07:00 [File:System] FileAccessDate : 2018:03:15 09:53:46-07:00 [File:System] FileCreateDate : 2018:03:15 09:57:15-07:00
- Does one of the dates and times, associated with
a.jpg
, match the date and time shown by Google Photos?
Check which date Google Photos will choose
- DateTimeOriginal — if available; if not then:
- CreateDate — if available; if not then:
- ModifyDate — if available; if not then:
- FileModifyDate
For a.jpg
Google Photos would choose the FileModifyDate — because that's what was available.
Add CreateDate to metadata
- Open a command prompt.
- Change directory at the command prompt to your working folder.
- Use the following
exiftool
command, at the command prompt, to look at the dates associated with all the photo files in the current folder —exiftool -s -a -G0:1 -time:all .
======== ./a.jpg [File:System] FileModifyDate : 2018:03:15 09:51:34-07:00 [File:System] FileAccessDate : 2018:03:15 09:53:46-07:00 [File:System] FileCreateDate : 2018:03:15 09:57:15-07:00 ======== ./b.jpg [File:System] FileModifyDate : 2018:03:15 09:52:46-07:00 [File:System] FileAccessDate : 2018:03:15 09:52:46-07:00 [File:System] FileCreateDate : 2018:03:15 09:57:15-07:00 1 directories scanned 2 image files read
- Use the following
exiftool
command, at the command prompt, to copy the current FileCreateDate to Exif metadata - for all the photo files in the current folder —exiftool -P "-CreateDate<FileCreateDate" -if "not $CreateDate" . 1 directories scanned 2 image files updated
exiftool -s -a -G0:1 -time:all . ======== ./a.jpg [File:System] FileModifyDate : 2018:03:15 09:51:34-07:00 [File:System] FileAccessDate : 2018:03:15 09:53:46-07:00 [File:System] FileCreateDate : 2018:03:15 09:57:15-07:00 [EXIF:ExifIFD] CreateDate : 2018:03:15 09:57:15 ======== ./b.jpg [File:System] FileModifyDate : 2018:03:15 09:52:46-07:00 [File:System] FileAccessDate : 2018:03:15 09:52:46-07:00 [File:System] FileCreateDate : 2018:03:15 09:57:15-07:00 [EXIF:ExifIFD] CreateDate : 2018:03:15 09:57:15 1 directories scanned 2 image files read
- Use the following
exiftool
command to not make backup files, and to process all subfolders of the current folder as-well-as the current folder —exiftool -overwrite_original -r -P "-CreateDate<FileCreateDate" -if "not CreateDate" .
- Note: only photo files without a CreateDate in Exif metadata will be updated —
exiftool -P "-CreateDate<FileCreateDate" -if "not CreateDate" . 1 directories scanned 2 files failed condition 0 image files read
We can make CreateDate available to Google Photos by copying the current FileCreateDate to Exif metadata:
Add DateTimeOriginal to metadata
- Here's a separate step-by-step explanation of how to add the dates we think the original photos were taken.
We can make DateTimeOriginal available to Google Photos, if it's missing.
Digital photos record the date and time when a photo was taken; scanned photos don't. So for scanned photos DateTimeOriginal is probably missing.
Upload the photo files to Google Photos
- If the photo files had been uploaded before making these changes, then it may be better to delete them from Google Photos before uploading these changed files: to avoid duplicates.
- Upload the photo files to Google Photos
- Delete the working copies of the photo files from your working folder
Summary:
Although many dates may be associated with a photo file; when a photo is uploaded to Google Photos, just one of those dates will be chosen and shown for that photo. Before upload, we can decide which date we want Google Photos to choose and make that date available in the photo file metadata.