Magic File Renamer Help


Index > Reference > Date & Time Format Strings



Date/Time format string is used in the File Date/Time Formatting Parameter and the Date Picture Taken Formatting Parameter in order to convert date values to a string using a pattern.

Standard Date/Time Format specifiers:
Specifier Name Example
d Short date pattern 11/29/2004
D Long date pattern Monday, November 29, 2004
t Short time pattern 10:36 AM
T Long time pattern 10:36:22 AM
f Full date/time pattern (short time) Monday, November 29, 2004 10:36 AM
F Full date/time pattern (long time) Wednesday, November 24, 2004 2:21:34 PM
g General date/time pattern (short time) 11/24/2004 2:21 PM
G General date/time pattern (long time) 11/24/2004 2:21:33 PM
M or m Month day pattern November 29
R or r RFC1123 pattern Wed, 24 Nov 2004 14:21:33 GMT
s Sortable date/time pattern; conforms to ISO 8601 2004-11-24T14:21:34
u Universal sortable date/time pattern 2004-11-24 14:21:33Z
Y or y Year month pattern November, 2004


Custom Date/Time Format specifiers:
Specifier Description Example
(for 8 Nov 2004, 4:22:18 PM)
d Displays the current day of the month, measured as a number between 1 and 31, inclusive. If the day is a single digit only (1-9), then it is displayed as a single digit. 8
dd Displays the current day of the month, measured as a number between 1 and 31, inclusive. If the day is a single digit only (1-9), it is formatted with a preceding 0 (01-09). 08
ddd Displays the abbreviated name of the day. Mon
dddd Displays the full name of the day. Monday
f Displays seconds fractions represented in one digit. 6
ff Displays seconds fractions represented in two digits 61
fff Displays seconds fractions represented in three digits. 617
ffff Displays seconds fractions represented in four digits. 6170
fffff Displays seconds fractions represented in five digits. 61702
ffffff Displays seconds fractions represented in six digits. 617024
fffffff Displays seconds fractions represented in seven digits. 6170245
g or gg Displays the era. A.D.
h Displays the hour in the range 1-12. The hour represents whole hours passed since either midnight (displayed as 12) or noon (also displayed as 12). If the hour is a single digit (1-9), it is displayed as a single digit. No rounding occurs when displaying the hour 4
hh Displays the hour in the range 1-12. The hour represents whole hours passed since either midnight (displayed as 12) or noon (also displayed as 12). If the hour is a single digit (1-9), it is formatted with a preceding 0 (01-09). 04
H Displays the hour in the range 0-23. The hour represents whole hours passed since midnight (displayed as 0). If the hour is a single digit (0-9), it is displayed as a single digit. 16
HH Displays the hour in the range 0-23. The hour represents whole hours passed since midnight (displayed as 0). If the hour is a single digit (0-9), it is formatted with a preceding 0 (01-09). 16
m Displays the minute in the range 0-59. The minute represents whole minutes passed since the last hour. If the minute is a single digit (0-9), it is displayed as a single digit. 22
mm Displays the minute in the range 0-59. The minute represents whole minutes passed since the last hour. If the minute is a single digit (0-9), it is formatted with a preceding 0 (01-09). 22
M Displays the month, measured as a number between 1 and 12, inclusive. If the month is a single digit (1-9), it is displayed as a single digit. 11
MM Displays the month, measured as a number between 1 and 12, inclusive. If the month is a single digit (1-9), it is formatted with a preceding 0 (01-09). 11
MMM Displays the abbreviated name of the month. Nov
MMMM Displays the full name of the month November
s Displays the seconds in the range 0-59. The second represents whole seconds passed since the last minute. If the second is a single digit (0-9), it is displayed as a single digit only. 18
ss Displays the seconds in the range 0-59. The second represents whole seconds passed since the last minute. If the second is a single digit (0-9), it is formatted with a preceding 0 (01-09). 18
t Displays the first character of the A.M./P.M. designator. P
tt Displays the A.M./P.M. designator. PM
y Displays the year as a maximum two-digit number. The first two digits of the year are omitted. If the year is a single digit (1-9), it is displayed as a single digit. 4
yy Displays the year as a maximum two-digit number. The first two digits of the year are omitted. If the year is a single digit (1-9), it is formatted with a preceding 0 (01-09). 04
yyyy Displays the year including the century. If the year is less than four digits in length, then preceding zeros are appended as necessary to make the displayed year four digits long. 2004
z Displays the time zone offset for the system's current time zone in whole hours only. The offset is always displayed with a leading sign (zero is displayed as "+0"), indicating hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-). The range of values is –12 to +13. If the offset is a single digit (0-9), it is displayed as a single digit with the appropriate leading sign. The setting for the time zone is specified as +X or –X where X is the offset in hours from GMT. The displayed offset is affected by daylight savings time. +2
zz Displays the time zone offset for the system's current time zone in whole hours only. The offset is always displayed with a leading or trailing sign (zero is displayed as "+00"), indicating hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-). The range of values is –12 to +13. If the offset is a single digit (0-9), it is formatted with a preceding 0 (01-09) with the appropriate leading sign. The setting for the time zone is specified as +X or –X where X is the offset in hours from GMT. The displayed offset is affected by daylight savings time. +02
zzz Displays the time zone offset for the system's current time zone in whole hours only. The offset is always displayed with a leading or trailing sign (zero is displayed as "+00"), indicating hours ahead of Greenwich mean time (+) or hours behind Greenwich mean time (-). The range of values is –12 to +13. If the offset is a single digit (0-9), it is formatted with a preceding 0 (01-09) with the appropriate leading sign. The setting for the time zone is specified as +X or –X where X is the offset in hours from GMT. The displayed offset is affected by daylight savings time. +2:00
: Time separator. Note that the ':' character cannot be used in file names. :
/ Date separator. Note that the '/' character cannot be used in file names. /
" Quoted string. Displays the literal value of any string between two quotation marks.  
' Quoted string. Displays the literal value of any string between two " ' " characters.  
\c Where c is any character, the escape character displays the next character as a literal.  
Any other character Other characters are written directly to the result string as literals.