Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
Gummo
Posts: 24
Joined: Tue Mar 01, 2016 5:39 pm

Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Post by Gummo »

I'm giving MP a go after many years with Classic. Is there any way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

I suspected the reason why 'Date modified' appears as 12-hour was that it comes from the Windows time format I use. And, that the 'Date taken' format was controlled by the EXIF format - until I inserted 'Date taken' onto the status bar where it appears now in 12-hr format.

Help, please!
User avatar
xnview
Author of XnView
Posts: 46585
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Post by xnview »

the system format for date is used
Pierre.
User avatar
Gummo
Posts: 24
Joined: Tue Mar 01, 2016 5:39 pm

Re: Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Post by Gummo »

Thanks Pierre.
jkm
Posts: 71
Joined: Sat May 11, 2024 12:43 am

Re: Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Post by jkm »

I think actually the answer to this question is "sort of".

What Pierre says is of course true, but you do NOT get seconds with that display.

XnViewMP exclusively uses the "Short Time" format, which does not give you seconds.

In order to display seconds in the time (which is needed when shooting sports and other events), either XnViewMP would have to use the "Long Time" format of you have to use a custom user-defined format, which you can do as follows:
Y - Year
y - Year without century (00-99)
m - Month as decimal (01-12)
d - Day as decimal (01-31)
H - Hour (01-24)
M - Minute (00-59)
S - Second (00-59)
B - Month name (e.g. February)
b - Abbreviated month name (e.g. Feb)
A - Weekday name (e.g. Wednesday)
a - Abbreviated weekday name (e.g. Wed)
{EXIF:Date Taken [a d/b/Y H:M:S]} will give you something like Sun 25/Sep/2005 21:45:38.
The problem with this, is that the formatting XnViewMP allows only includes 24-hour based time, not 12 based with am/pm.

So the reality is you cannot have:
1:37:53 PM


XnViewMP only allows you to have 13:37:53

To get 1:37:53 PM, either:

1. XnViewMP must use "Long Time" instead of "Short Time"
or
2. XnViewMP's syntax must be extended to include "h - Hour (01-12)" and "p - AM/PM" (Actually in PHP "a" corresponds to am/pm, but Pierre seems to have instead used "a" where PHP uses "D")

Hopefully this helps Gummo and perhaps is a possibility of improvement for Pierre.
User avatar
Gummo
Posts: 24
Joined: Tue Mar 01, 2016 5:39 pm

Re: Way to get 'Date taken' to appear in 12-hour format with lower case am/pm?

Post by Gummo »

Thanks jkm for your kind info. Maybe an update will make it happen.
Post Reply