Jump to: navigation, search

Stat Server:statserver:time-format


View in ref guide.

Edit this option          Publish this option          Clear draft content


Published Option

time-format

Default Value: %m/%d/%Y %H:%M:%S
Valid Values: See table for a complete listing of valid time formats.
Changes Take Effect: After restart
Dependencies: local-time-in-status-table = yes

Specifies the time format of data stored in the StartLocalTime and EndLocalTime fields in the STATUS table. You must set the local-time-in-status-table option to yes to use the time-format option.

The format string consists of one or more codes preceded by a percent sign (%). Character strings that do not begin with % are copied unchanged to strDest.

This option was previously named TimeFormat.

Example:

Suppose you are using the default time format %m/%d/%Y %H:%M:%S. If the start time for a particular state is Tuesday, January 1, 1999, at 3 PM and 10 seconds, character data stored in the STARTLOCALTIME field in the STATUS table is stored as 01/01/1999 15:00:10. Changing the format codes for the date in the time-format option to %Y/%m/%d means the date is stored in the international date format as 1999/01/01. Spaces can also be used. For example, %Y %m %d would store as 1999 01 01.

Valid Time-Format Codes:

Format CodeDescription
%aAbbreviated weekday name
%AFull weekday name
%bAbbreviated month name
%BFull month name
%cDate and time representation appropriate for locale
%dDay of month as decimal number (01-31)
%HHour in 24-hour format (00-23)
%IHour in 12-hour format (01-12)
%jDay of year as decimal number (001-366)
%mMonth as a two-digit number (01-12)
%MMinute as a two-digit number (00-59)
%pCurrent locale's AM/PM indicator for 12-hour clock
%SSecond as decimal number (00-59)
%UWeek of year as a two-digit number, with Sunday as the first day of week (00-51)
%wWeekday as a one-digit number (0-6; Sunday is 0)
%WWeek of year as decimal number, with Monday as first day of week (00-51)
%xDate representation for current locale
%XTime representation for current locale
%yYear without century, as a two-digit number (00-99)
%YYear with century, as a four-digit number
%z, %ZTime-zone name or abbreviation; no characters if timezone is unknown
%%Percent sign
%#cLong date and time representation, appropriate for current locale; for example, Wednesday, March 14, 2001, 12:41:29
%#xLong date representation, appropriate to current locale; for example, Wednesday, March 14, 2001
#The pound sign (#) can precede any formatting code. This changes the meaning of the format code as shown in entries with the pound sign in this table.
Notes:
  • The pound sign is ignored in these format codes: %#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#%
  • The pound sign in these format codes removes any leading zeroes: %#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y
  • Draft Option

    No draft option

    This page was last edited on December 27, 2016, at 23:47.
    Comments or questions about this documentation? Contact us for support!