Miscellaneous Variables

Topic Contents [Hide]Topic Contents [Show]
  1. Date Format Parameters
    1. Date/Time
    2. Day
    3. Week
    4. Month
    5. Year
    6. Other
  2. Errors
  3. Events
  4. Symbols

Date Format Parameters

Format commands can be used in conjunction with the display of any date variables, such as ~samp,date~ or ~date~. The default format for any date and time strings is the locale settings on your computer.

Letters are case sensitive

Format commands can be combined

The proper format for these would be as follows: ~samp,date,n~ (where n equals one or more of the format parameters).

If the date was March 14, 2002, ~samp,date,% d-%b-%Y~ would resolve to "14-MAR-2002".
If the time were 08:12:59, ~samp,date,%M past %H~ would resolve to "12 past 08".

Date/Time

%c - Date and time representation appropriate for locale

%H - Hour in 24-hour format (00 – 23)

%I - Hour in 12-hour format (01 – 12)

%M - Minute as decimal number (00 – 59)

%p - Current locale's A.M./P.M. indicator for 12-hour clock

%S - Second as decimal number (00 – 59)

%x - Date representation for current locale

%X - Time representation for current locale

%z - Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown.

%Z - Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown.

Day

%a - Abbreviated weekday name

%A - Full weekday name

%d - Day of month as decimal number (01 – 31)

%j - Day of year as decimal number (001 – 366)

%w - Weekday as decimal number (0 – 6; Sunday is 0)

Week

%U - Week of year as decimal number, with Sunday as first day of week (00 – 53)

%W - Week of year as decimal number, with Monday as first day of week (00 – 53)

Month

%b - Abbreviated month name

%B - Full month name

%m - Month as decimal number (01 – 12)

Year

%y - Year without century, as decimal number (00 – 99)

%Y - Year with century, as decimal number

Other

%% - Percent sign.

Errors

~err~

Returns the value of the error (the amount out of  tolerance). Always an absolute

value.

~err2~

Returns the amount of error of a value compared to tolerance 2.

~errr~

Returns the amount of error of a value compared to reasonable limits.

Events

~eventcount1~

Returns the number of events for Trigger 1.

~eventcount2~

Returns the number of events for Trigger 2.

~eventcountboth~

Returns the number of events that triggered for both Trigger 1 and 2.

Symbols

~#~

Inserts a number value incrementally in a table. The ~#~ variable can also be used with increments by adding a number (1-9) after the # sign. For example, ~#,1~ or ~#,2~.

~%~

Inserts the Percent ( % ) symbol.

~brace,l~

Inserts the left brace ( { ) character.

~brace,r~

Inserts the right brace ( } ) character.

~tilde~

Inserts the tilde ( ~ ) character.

Can we improve this topic?