Macro Date and Time Syntax
- Last Updated: April 2, 2024
- 1 minute read
- MOVEit Automation
- Version 2026
- Documentation
The Macro Date and Time Syntax specifies how date and time elements are represented in filenames and messages. Elements supported include day-of-week, day-of-month, day-of-year (Julian), hour, minute, second, month, week-of-year and year.
Operators such as the minus sign normally apply to all times and dates in a macro phrase. To apply operators to only part of a macro phrase, use double-quotes to delimit phrases. For example, if today is currently July 5, 2007, a macro of:
-
[dd][mm-][yyyy] [dd][mm][yyyy]yields 05062007 05062007 -
"[dd][mm-][yyyy]" [dd][mm][yyyy]yields "05062007" 05072007
|
Attribute |
Description |
|
A |
DAY-OF-WEEK; minimal numeric. Example: "2" (Sunday=0) |
|
AAA |
DAY-OF-WEEK; three-letter abbreviation. Example: "Tue" |
|
AAAA |
DAY-OF-WEEK; full. Example: "Tuesday" |
|
B |
DAY-OF-WEEK; minimal numeric. Example: "2" (Sunday=1) |
|
D |
DAY-OF-MONTH; minimal representation. Example: "7" |
|
DD |
DAY-OF-MONTH; two-digit representation. Example: "07" |
|
H |
HOUR; minimal representation, 24-hour clock. Example: "7" |
|
HH |
HOUR; two-digit representation, 24-hour clock. Example: "07" |
|
HHH |
HOUR; minimal representation, 12-hour clock. Example: "7" |
|
HHHH |
HOUR; two-digit representation, 12-hour clock. Example: "07" |
|
II |
am/pm; two-digit representation of "am" or "pm" designation. Example: "pm" |
|
J |
JULIAN DATE; minimal representation. Example: "7" First day of year is 0. |
|
JJJ |
JULIAN DATE; three-digit representation. Example: "007" First day of year is 0. |
|
K |
JULIAN DATE; minimal representation. Example: "7" First day of year is 1. |
|
KKK |
JULIAN DATE; three-digit representation. Example: "007" First day of year is 1. |
|
M |
MONTH; minimal numeric representation. Example: "7" First month is 1. |
|
MM |
MONTH; two-digit numeric representation. Example: "07" First month is 1. |
|
MMM |
MONTH; short representation. Example: "Jan" |
|
MMMM |
MONTH; full representation. Example: "January" |
|
S |
SECOND; minimal representation. Example: "7" |
|
SS |
SECOND; two-digit representation. Example: "07" |
|
T |
MINUTE; minimal representation. Example: "7" |
|
TT |
MINUTE; two-digit representation. Example: "07" |
|
W |
WEEK-OF-YEAR; minimal representation. First week is numbered 0. Example: "2" |
|
WW |
WEEK-OF-YEAR; two-digit representation. First week is numbered 0. Example: "02" |
|
X |
WEEK-OF-YEAR; minimal representation. First week is numbered 1. Example: "2" |
|
XX |
WEEK-OF-YEAR; two-digit representation. First week is numbered 1. Example: "02" |
|
YY |
YEAR; two-digit representation. Example: "02" |
|
YYYY |
YEAR; four-digit representation. Example: "2002" |
|
+ |
The + symbol following any time or date designation increments the current time or date by one unit of the designation. The entire time or date is affected, with a rollover from second-to-second, minute-to-minute, day-to-day, month-to-month, etc. as required. A + after a second designation increments the time by one second; a + after a minute designation increments the time by one minute; a + after a day designation increments the date by one day; a + after a month designation increments the date by one month, etc. For example, 07:10:30 on June 30, 2003, |
|
- |
The - symbol following any time or date designation will decrement the current time or date by one unit of the designation. The entire time or date is affected, as with a + symbol. For example, |