The date variables contain in general a date and a time. For example : the moment of the modification of a file, the one of the shot of a photo ...
If their default format is "YYYYMMDD_HHMMSS", it is possible to redefine it precisely. Specific variables can be used to describe the expected representation (you can add free text to it too). These variables give access to the constituting elements of the date/time. Outside of this context these variables are meaningless. No rename expression modifier can be applied to them.
The value of many of them is based on the "Regional Options" chosen for your system.
Here is a list :
%a | Abbreviated weekday name |
%A | Full weekday name |
%b | Abbreviated month name |
%B | Full month name |
%c | Date and time, appropriate for locale |
%d | Day of month (01-31) |
%H | Hour (00-23) |
%I | Hour (01-12) |
%j | Day of year (001-366) |
%m | Month (01-12) |
%M | Minute (00-59) |
%p | A.M./P.M. indicator |
%S | Second (00-59) |
%U | Week of year number, start at first Sunday (00-53) |
%w | Weekday (0-6; Sunday is 0) |
%W | Week of year, start at first Monday (00-53) |
%x | Date representation for current locale |
%X | Time representation for current locale |
%y | Year without century (00-99) |
%Y | Year |
%z | Time-zone name or abbreviation |
%% | '%' character |
Depending on your system (it should at least work under Windows), the character '#' can be used as prefix for some variables to get a different result.
%#c Long date and time, appropriate for current locale %#x Long date, appropriate to current locale %#d,%#H,%#I,
%#j,%#m,%#M,
%#S,%#U,%#w,
%#W,%#y,%#YRemove leading zeros
All the other characters are seen as free text and will be simply copied.
In an expression, to get a '\' in the result, it has to be doubled. This is not necessary in "Preferences/New name computation/Dates".
For the date : 20060701_120101
Format Result %Y-%m-%d 2006-07-01 %m-%d-%Y at %Hh%Mm%Ss 07-01-2006 at 12h01m01s %j 182
It is possible, in addition to the format, to specify a time to add or substract to a date. This can be useful, for example, in case of a camera "Daylight Saving Time" configuration problem. The format is the same as the one already explained for the date modifier.
Here are some examples of usage in an expression :
%D{"%Y-%m-%d at Hh%Mm%Ss",1h30m} Formats %D after adding 1 hour 30 minutes to it %On{"%Y-%m-%d at Hh%Mm%Ss",60m} Formats %On after adding 1 hour to it %Ydc{,-1h} Formats %Ydc according the default format defined in "Preferences/New name computation/Dates" after substracting 1 hour from it %Xdo{,+25h1m1s} Formats %Xdo according the default format defined in "Preferences/New name computation/Dates" after adding 1 day, 1 hour, 1 minute and 1 second to it
About date formats and how it can be useful in the file name building process, a FAQ entry deserve to be read : Default date format