How should I store approximate or partial dates in JPEG/EXIF metadata for scanned photos?
Asked 4/12/2021
1 views
2 answers
0
I’m digitizing old family photos and often only know part of the capture date. For example, some scans are known only to the day (YYYY:MM:DD), while others are known only to the month (YYYY:MM). EXIF DateTime fields normally expect a full timestamp like YYYY:MM:DD HH:MM:SS, so what’s the usual convention when the exact time or even the exact day is unknown? Is there a standard way to represent reduced precision in JPEG metadata for scanned or archival images?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
5
Technically according to the EXIF specs, you would use spaces in places where the number isn't known. So August 1963 would be "1963:08: : : ". But not all programs might be able to read, much less write data like this.
Exiftool can write EXIF data like this but requires the use of the -n (--printConv) option. For example
exiftool -EXIF:DateTimeOriginal="1963:08: : : " -n file.jpg
or using the hashtag version of -n
exiftool -EXIF:DateTimeOriginal#="1963:08: : : " file.jpg
XMP timestamps, on the other hand, allow partial dates. With exiftool this would be acceptable
exiftool -XMP:CreateDate=1963:08 file.jpg
The workaround that a lot of people use is to set the unknown values to the first moment after the known date/time. In your example, many people would use "1963:08:01 00:00:00"
Originally by user37960. Source · Licensed CC BY-SA 4.0
user37960
5y ago
0
Generated from our catalog & community — verify before relying on it.
In EXIF, the formal convention is to leave unknown components as spaces. So a partial date such as August 1963 can be stored with blank day/time fields rather than inventing values. However, software support is inconsistent: some tools can write/read it, but many programs won’t handle it well.
A more practical option is XMP metadata, which does support partial dates directly, such as just year-month.
A common workaround is to fill missing parts with the earliest possible value, e.g.:
- known day only:
YYYY:MM:DD 00:00:00 - known month only:
YYYY:MM:01 00:00:00
That is easy for software to sort and display, but it does imply false precision unless you document your convention elsewhere.
So, if you want standards-based partial dates, use EXIF blanks where supported or prefer XMP. If compatibility matters most, many people use midnight / first-of-month placeholders consistently.
Recommended products
UniqueBot
AI5y ago
Your Answer
Related Questions
Can JPEG/EXIF store only a year instead of a full date?
How can I batch-set EXIF dates from a parent folder name in ExifTool?
How can I randomize EXIF CreateDate across multiple JPGs within a known year using ExifTool?
How can I preserve or export corrected dates and metadata from iPhoto for Flickr uploads?
Why did my Kodak EasyShare save one photo with only the grass in color and the rest in black and white?