I create an Evaluator column to know the number of days/hours/months between today and image was taken.
My idea is:
- If it is a jpg file and if there is a shooting date then...
- Calculate and display the result
I see this post Concise Time Notation (27d 6h 56m) evaluator tooltip/column, try to adapt it and create this code that display what I want but errors are generated.
<?xml version="1.0"?>
<evalcolumn align="1" attrrefresh="yes" autorefresh="yes" category="image" foldertype="all" graphcol="#ff8000" header="Prise de vue**" keyword="shootingtimecompteur" maxstars="5" namerefresh="yes" reversesort="no" title="Date/heure (prise de vue) (compteur)**" type="0">if ((IsSet(ext)) || (ext="jpg"))
if (IsSet(shootingtime))
seconds = DateDiff("s", shootingtime, Now());
s = seconds Mod 60;
m = seconds / 60 Mod 60;
h = seconds / 60 / 60 Mod 24;
d = seconds / 60 / 60 / 24;
ss = (d > 0 || s == 0) ? "" : s + "s";
mm = (m == 0) ? "" : m + "m ";
hh = (h == 0) ? "" : h + "h ";
dd = (d == 0) ? "" : d + "j ";
return Trim(dd + hh + mm + ss);</evalcolumn>
How to delete errors (Erreur à la ligne 4, position 7. Valeur inconnue (6): seconds) ?