Date and time format

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 :



%aAbbreviated weekday name
%AFull weekday name
%bAbbreviated month name
%BFull month name
%cDate and time, appropriate for locale
%dDay of month (01-31)
%HHour (00-23)
%IHour (01-12)
%jDay of year (001-366)
%mMonth (01-12)
%MMinute (00-59)
%pA.M./P.M. indicator
%SSecond (00-59)
%UWeek of year number, start at first Sunday (00-53)
%wWeekday (0-6; Sunday is 0)
%WWeek of year, start at first Monday (00-53)
%xDate representation for current locale
%XTime representation for current locale
%yYear without century (00-99)
%YYear
%zTime-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,%#Y
Remove 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

FormatResult
%Y-%m-%d2006-07-01
%m-%d-%Y at %Hh%Mm%Ss07-01-2006 at 12h01m01s
%j182

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