Previous Topic: Parsing Tokens

Next Topic: Add a Custom Token to the Library

Datetime Token Values

CA Enterprise Log Manager supports various syntax options for datetime parsing tokens. You can use these options, in the parsing file datetime format, to customize your datetime stamp appearance.

Each datetime token is composed of one of the following:

CA Enterprise Log Manager supports the following conversion specifications:

%a or %A

Displays the local weekday name, in full or abbreviated form. On Windows, this specification is available in US English only.

%b or %B or %h

Displays the local month name, in full or abbreviated form. On Windows, this specification is available in US English only.

%c

Displays the local date and time.

%C

Displays the century number (0-99).

%d or %e

Displays the day of the month (1-31).

%D

Displays the American style date: Month/Day/Year - the equivalent of entering %m/%d/%y.

Note: The syntax %d/%m/%y is used in Europe. The ISO 8601 standard format is %Y-%m-%d.

%H

Displays the hour on a 24-hour clock (0-23).

%I

Displays the hour on a 12-hour clock (1-12).

%j

Displays the day number of the year (1-366).

%m

Displays the month number (1-12).

%M

Displays the minute (0-59).

%n

Inserts an arbitrary whitespace.

%p

Displays the local equivalent of AM or PM, if any.

%r

Displays the 12-hour clock time: Hour:Minute:Second AM/PM - the equivalent of entering %I:%M:%S %p. If t_fmt_ampm is empty in the local LC_TIME section then the behavior is undefined.

%R

Displays the 24-hour clock time: Hour:Minute - the equivalent of entering %H:%M.

%S

Displays the second (0-60 - 60 can occur for leap seconds).

%t

Displays an arbitrary whitespace.

%T

Displays the 24-hour clock time: Hour:Minute:Second - the equivalent of entering %H:%M:%S.

%U

Displays the week number. Sunday is the first day of the week (0-53). The first Sunday of January is the first day of week 1.

%w

Displays the weekday number (0-6) with Sunday = 0.

%W

Displays the week number with Monday the first day of the week (0-53). The first Monday of January is the first day of week 1.

%x

Displays the date, using the local date format.

%X

Displays the time, using the local time format.

%y

Displays the year in the current century (0-99). When a century is not specified, values in the range 69-99 refer to years in the twentieth century (1969-1999); values in the range 00-68 refer to years in the twenty-first century (2000-2068).

%Y

Displays the year, including century (for example, 1991).

%z

Displays an RFC-822/ISO 8601 standard time zone specification. This specification is not available on Windows.

The default CA Enterprise Log Manager datetime token format is:

%d/%b/%Y:%H:%M:%S %z