Date/Time

 

Build date and time formats with this command. Many of these formats are based on the definitions in the Regional Settings of the Control Panel. The month, day, etc. display in the language defined in the Regional Settings. Either save the date and time to a variable or have the macro insert the information into another application.

 

 

Date/Time Tab

 

 

Script Editor > Expand Variables Category > Date/Time

 

 

How Would You Like to Set the Date?

Select one of the four options from the drop down menu to set the date and/or time.

 

Set it to the Current Date/Time

This option uses the date and time from your system clock at macro run time.

 

Use a Specific Date/Time

Use this option to have a specific date or time played back in a macro. Set the value to a specific date or time, either in the past or future.

 

Adjust the Current Date/Time

Adjust the date or time by Days, Months, Years, Hours, Minutes or Seconds into the future or past. The calculations are based on the computer's current system time and date. Insert negative numbers in the fields to adjust the date or time to the past.

 

Prompt the User

This option opens a small dialogue window during macro playback requesting the user select a date and or time. The date and/or time is displayed in the format selected.

 

Prompt

Enter any instructions for the macro user in the Prompt field. The instructions display in the window that opens during macro playback. The current date is displayed in the edit field. The user can either overwrite any of the date information or use the attached calendar to select a date.

If a time prompt is selected, the current time is displayed in the edit field. Overwrite the time by highlighting the hours, minutes or seconds and editing the current entry or use the up and down arrows on the keyboard to change the values.

 

Set Manually

The Set Manually button opens a window to allow positioning of the Prompt window - to set where it will appear on the screen during macro playback. See the Position Window topic for more details.

 

Prompt for Date/Prompt for Time

Select to have the macro prompt the user for a date, a time or both.

 

 

Operation Tab

 

 

 

 

 

What would you like to do with the date/time stamp?

Select from the drop down list what to do with the date and time stamp.

 

Type the Date/Time Stamp Out

This option types the text (date and/or time) in the format selected into the application that is open when the macro runs.

 

Store the Date/Time Stamp in a Text Variable

This places the date and/or time into a text string variable. Select or create the text string variable to store the date/time information.

 

Store the Date/Time in a Date/Time Variable

Select this option to save the date and/or time to a Date/Time variable. Select or create the date/time variable to store the date/time information. 

 

 

Select the variable to receive the date/time stamp

Choose the variable to store the date/time information. This option is available if either the Store the Date/Time Stamp in a Text Variable or Store the Date/Time in a Date/Time Variable is selected.

 

 

Choose a Date/Time Format

Select the date and or time format from the drop down list of pre-defined formats. Or create a new format by typing in the date or time characters into this field. This option is not available if the Store the Date/Time in a Date/Time Variable method is chosen. 

 

 

 

Modifier

Description

c

Displays the date using the Short Date Format defined in the Control Panel - Regional Settings, followed by the time using the Long Time format defined in the Control Panel - Regional Settings. The time is not displayed if the fractional part of the Date Time value is zero.

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) using the Short Day Name format defined in the Control Panel - Regional Settings.

dddd

Displays the day as a full name (Sunday-Saturday) using the Long Day Name format defined in the Control Panel - Regional Settings.

ddddd

Displays the date using the Short Date format defined in the Control Panel - Regional Settings.

dddddd

Displays the date using the Long Date format defined in the Control Panel - Regional Settings.

m Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

m

Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm

Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm

Displays the month as an abbreviation (Jan-Dec) using the Short Month Names format defined in the Control Panel - Regional Settings.

mmmm

Displays the month as a full name (January-December) using the Long Month Names format defined in the Control Panel - Regional Settings.

yy

Displays the year as a two-digit number (00-99).

yyyy

Displays the year as a four-digit number (0000-9999).

h

Displays the hour without a leading zero (0-23).

hh

Displays the hour with a leading zero (00-23).

n

Displays the minute without a leading zero (0-59).

nn

Displays the minute with a leading zero (00-59).

s

Displays the second without a leading zero (0-59).

ss

Displays the second with a leading zero (00-59).

z

Displays the millisecond without a leading zero (0-999).

zzz

Displays the millisecond with a leading zero (000-999).

t

Displays the time using the Short Time format defined in the Control Panel - Regional Settings.

tt

Displays the time using the Long Time format defined in the Control Panel - Regional Settings.

am/pm

Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p

Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm

Uses the 12-hour clock for the preceding h or hh specifier, and displays AM symbol defined in the Control Panel - Regional Settings for any hour before noon, and the contents of the PM setting defined in the Control Panel - Regional Settings for any hour after noon.

/

Displays the date separator character defined in the Control Panel - Regional Settings.

:

Displays the time separator character defined in the Control Panel - Regional Settings.

'xx'/"xx"

Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.