I can get the EXIF data from an image using PIL, but how can I get the date and time that the photo was taken?
Found the answer eventually, the tag I needed was 36867:
from PIL import Image def get_date_taken(path): return Image.open(path)._getexif()[36867]
2.1m questions
2.1m answers
60 comments
57.0k users