Macros
You can use date macros in log file paths and report output folder paths.
The date macros are based on the current system date.
| Macro |
Description |
Range |
%date+n%
%date-n% |
Adds or subtracts n days from the current system date. It is used to change the base date for all other macros. By default the current date is used but you can add or subtract several days to the date by using this macro. |
|
| %dd% |
Day (2 digit) |
01-31 |
| %mm% |
Month (2 digit) |
01-12 |
| %yy% |
Year (2 digit) |
00-99 |
| %yyyy% |
Year (4 digit) |
1900-... |
| %dw% |
Day of the week |
1-7 |
| %dy% |
Day of the year |
001-366 |
| %wm% |
Week of the month |
1-6 |
| %wy% |
Week of the year |
01-53 |
| %dow% |
Day of the week |
mon-sun |
| %Dow% |
Day of the week |
Mon-Sun |
| %DOW% |
Day of the week |
MON-SUN |
| %dayofweek% |
Day of the week |
monday-sunday |
| %DayOfWeek% |
Day of the week |
Monday-Sunday |
| %DAYOFWEEK% |
Day of the week |
MONDAY-SUNDAY |
| %mon% |
Month |
jan-dec |
| %Mon% |
Month |
Jan-Dec |
| %MON% |
Month |
JAN-DEC |
| %month% |
Month |
january-december |
| %Month% |
Month |
January-December |
| %MONTH% |
Month |
JANUARY-DECEMBER |
Examples
The examples assume that the current date is June 27, 2002
| c:\logs\%dd%%mm%%yyyy%.log |
c:\logs\27062002.log |
| c:\logs\ex%date-10%%yy%%mm%%dd%.* |
c:\logs\ex020617.* |
| c:\logs\access-%Mon%%yyyy%\*.log |
c:\logs\access-Jun2002\*.log |
| c:\export\%yy%%MON%%dd%.doc |
c:\export\02JUN27.doc |
|