!NOW
(LinkToClipboard)From iMacros
Contains the current time and date. In order to format the time and date you can use the following format codes, which you need to append to the variable after a colon (see Examples):
!NOW:format_code
Contents |
Format code
The format codes are case sensitive. Format code can include spaces but make sure to use the <SP> character instead. If you want to include text like th to format something like June 4th, enclose the text in "".
- none
- Displays the number with no formatting, i.e. the standard format defined by your operating system is used..
- :
- Time separator. In some locales other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system settings. This option should NOT be used in file names.
- /
- Date separator. In some locales other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your system settings. This option should NOT be used in file names.
- D
- Displays the day as a number without a leading zero (1 - 31)
- dd
- Displays the day as a number with a leading zero (01 - 31)
- ddd
- Displays the day as an abbreviation (Sun - Sat).
- dddd
- Displays the day as a full name (Sunday - Saturday)
- ddddd
- Displays the date as a complete date (including day, month, and year), formatted according to your system's short date format setting. The default short date format is m/d/yy. This option should NOT be used in file names.
- dddddd
- Displays a date serial number as a complete date (including day, month, and year) formatted
according to the long date setting recognized by your system. The default long date format is mmmm dd, yyyy.
- w
- Displays the day of the week as a number (1 for Sunday through 7 for Saturday).
- ww
- Displays the week of the year as a number (1 - 53).
- m
- Displays the month as a number without a leading zero (1 - 12). If m immediately follows h or hh, the minute rather than the month is displayed.
- mm
- Displays the month as a number with a leading zero (01 - 12). If m immediately follows h or hh, the minute rather than the month is displayed
- mmm
- Displays the month as an abbreviation (Jan - Dec).
- mmmm
- Displays the month as a full month name (January - December).
- q
- Displays the quarter of the year as a number (1 - 4).
- y
- Displays the day of the year as a number (1 - 366).
- yy
- Displays the year as a 2-digit number (00 - 99).
- yyyy
- Displays the year as a 4-digit number (100 - 9666).
- h
- Displays the hour as a number without leading zeros (0 - 23).
- hh
- Displays the hour as a number with leading zeros (00 - 23).
- n
- Displays the minute as a number without leading zeros (0 - 59).
- nn
- Displays the minute as a number with leading zeros (00 - 59).
- s
- Displays the second as a number without leading zeros (0 - 59).
- ss
- Displays the second as a number with leading zeros (00 - 59).
- AM/PM
- Uses the 12-hour clock and display an uppercase AM with any hour before noon; display an uppercase PM with any hour between noon and 11:59 P.M.
- am/pm
- Uses the 12-hour clock and display a lowercase AM with any hour before noon; display a lowercase PM with any hour between noon and 11:59 P.M.
Note: The iMacros for Firefox extension supports only the most common formatting options (marked in bold above, yyyy, yy, mm, dd, hh, mm, ss).
Value
The current date and time.
Examples
All following examples assume that it was the 25th May 1980, 04:35:00 in the morning when the command was executed:
!NOW:ddmmyy_hhmmss
results in 25051980_043500
!NOW:mmmm<SP>dd"th"<SP>yyyy
results in May 25th 1980
