Page 1 of 1
How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 05 Apr 2026 09:53
by tobwen
I have a photo which was originally taken at lets say 03.03.2026 at 17:14 with a smartphone.
A few days later I copied the photo to my Windows system and applied some changes with a photo/image editor
The photo file got a new creation + last modified date.
Luckily the EXIF Meta-data header contains still the original Date when the photo was taken.
I can peek into the EXIF header with well known tools like exiftool or QuickImageComment.
In EXIF header section "photo" I can see the EXIF header fields "DateTimeDigitzed" and "DateTimeOriginal" which contain the original creation time (which is equal here).
Now I want to show the DatetimeOriginal in a separate column in XYplorer.
I though the XYP column "Date Taken" would do it. But it is always empty.
How can I tell XYplorer to retrieve the date for column "Date Taken" from the EXIF header fields DateTimeOriginal?
....or invent a new column for this task?
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 05 Apr 2026 10:20
by highend
The special property "Date Taken" (as a column) is empty?
Not here...
A cc would look like this:
2026-04-05_10-21-07.png
Code: Select all
Snip: CustomColumn 1
XYplorer 27.20.1200, 05.04.2026 10:20:09
Action
ConfigureColumn
Caption
DateTimeOriginal
Type
3
Definition
return get("exif", "0x9003", <cc_item>);
Format
0
Trigger
0
Item Type
0
Item Filter
{:Image}
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 05 Apr 2026 13:58
by tobwen
@highend:
Thank you for your comment:
I setup the column just as you described
After adding the column it is still empty.
See attached snapshot
Moreover:
Surprisingly the column vanishes when I switch to another folder and go back. How do I make the new column permanent?
Furthermore I attached a sample *.jpg
DTO column empty.png
Test DateTimeOriginal.zip
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 05 Apr 2026 14:48
by highend
Maybe because the EXIFIFD for DateTimeOriginal returns 21 bytes instead of 20 as for all my images and that confuses XY? Don't know, Don needs to say something about this.
You could use:
https://www.exiv2.org/download.html
Code: Select all
$exiv = "<xydrive>\Tools\@CLI Tools\exiv2\exiv2.exe";
$result = runret("""$exiv"" -pv -q -g Exif.Photo.DateTimeOriginal ""<cc_item>""");
$date = regexmatches($result, "[0-9: ]{19}$");
$time = gettoken($date, 2, " ");
return replace(gettoken($date, 1, " "), ":", "-") . " " . $time;
but I can't recommend this for folders with many files. You'd better tag them in that case...
Surprisingly the column vanishes when I switch to another folder and go back. How do I make the new column permanent?
A default folder view (without this column) or a specific one for that folder / root is in place?
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 05 Apr 2026 21:17
by jupe
Check this dialog to see if it is displayed under an alternate field: File | Metadata, also because there are 2 Date Taken columns in XY, a Shell Property and a Special Property, and they are not always the same.
edit: I didn't notice you uploaded a sample when I posted that, yeah it looks like something is non standard in the way Paint Shop Pro saves the date, or exif data in general, or do photos straight from your phone also not show the date?, anyway if you re-write just the exif data it is corrected though, eg:
2026-05-18_101012.png
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 06 Apr 2026 08:26
by tobwen
jupe wrote: ↑05 Apr 2026 21:17
edit: I didn't notice you uploaded a sample when I posted that, yeah it looks like something is non standard in the way Paint Shop Pro saves the date, or exif data in general, or do photos straight from your phone also not show the date?, anyway if you re-write just the exif data it is corrected though, eg:
Very interesting.
PSP is the culprit
Original photos from Samsung S23 Smartphone are shown correctly in XYP column.
Does "21" mean 21 bytes or 21 bits or format spec "21" or 21st position of EXIF enumeration fields or .....?
How did you changed the value from 21 back to 20?
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 06 Apr 2026 08:48
by highend
Does "21" mean 21 bytes or 21 bits or format spec "21" or 21st position of EXIF enumeration fields or .....?
EXIFIFD for DateTimeOriginal returns 21 bytes instead of 20
exiftool -G1 -v3 "your sample file"
Code: Select all
| | 5) DateTimeOriginal = 2022:09:11 13:53:10
| | - Tag 0x9003 (21 bytes, string[21]):
| | 0242: 32 30 32 32 3a 30 39 3a 31 31 20 31 33 3a 35 33 [2022:09:11 13:53]
| | 0252: 3a 31 30 00 00 [:10..]
And a file for that
return get("exif", "0x9003", <cc_item>); works looks like:
Code: Select all
| | 3) DateTimeOriginal = 2007:07:20 19:57:19
| | - Tag 0x9003 (20 bytes, string[20]):
| | 12dc: 32 30 30 37 3a 30 37 3a 32 30 20 31 39 3a 35 37 [2007:07:20 19:57]
| | 12ec: 3a 31 39 00 [:19.]
How did you changed the value from 21 back to 20?
By writing it again with e.g.
exiftool?
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Posted: 07 Apr 2026 07:22
by tobwen
Thank you