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?
How to really show (and copy) the EXIF original date for "Date taken" of a photo?
-
tobwen
- Posts: 53
- Joined: 08 Jan 2022 08:43
-
highend
- Posts: 14922
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
The special property "Date Taken" (as a column) is empty?
Not here...
A cc would look like this:
Not here...
A cc would look like this:
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}
You do not have the required permissions to view the files attached to this post.
One of my scripts helped you out? Please donate via Paypal
-
tobwen
- Posts: 53
- Joined: 08 Jan 2022 08:43
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
@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
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
You do not have the required permissions to view the files attached to this post.
-
highend
- Posts: 14922
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
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
but I can't recommend this for folders with many files. You'd better tag them in that case...
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;
A default folder view (without this column) or a specific one for that folder / root is in place?Surprisingly the column vanishes when I switch to another folder and go back. How do I make the new column permanent?
One of my scripts helped you out? Please donate via Paypal
-
jupe
- Posts: 3446
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
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:
You do not have the required permissions to view the files attached to this post.
-
tobwen
- Posts: 53
- Joined: 08 Jan 2022 08:43
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
Very interesting.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:
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?
-
highend
- Posts: 14922
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to really show (and copy) the EXIF original date for "Date taken" of a photo?
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..]
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.]
By writing it again with e.g.How did you changed the value from 21 back to 20?
exiftool?One of my scripts helped you out? Please donate via Paypal
-
tobwen
- Posts: 53
- Joined: 08 Jan 2022 08:43
XYplorer Beta Club