manpagez: man pages & more
info gnuplot
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.25.23.3 time/date specifiers

In time/date mode, the acceptable formats are:

      Format       Explanation
      %a           abbreviated name of day of the week
      %A           full name of day of the week
      %b or %h     abbreviated name of the month
      %B           full name of the month
      %d           day of the month, 01--31
      %D           shorthand for "%m/%d/%y" (only output)
      %F           shorthand for "%Y-%m-%d" (only output)
      %k           hour, 0--23 (one or two digits)
      %H           hour, 00--23 (always two digits)
      %l           hour, 1--12 (one or two digits)
      %I           hour, 01--12 (always two digits)
      %j           day of the year, 1--366
      %m           month, 01--12
      %M           minute, 0--60
      %p           "am" or "pm"
      %r           shorthand for "%I:%M:%S %p" (only output)
      %R           shorthand for "%H:%M" (only output)
      %s           number of seconds since the start of year 2000
      %S           second, integer 0--60 on output, (double) on input
      %T           shorthand for "%H:%M:%S" (only output)
      %U           week of the year (week starts on Sunday)
      %w           day of the week, 0--6 (Sunday = 0)
      %W           week of the year (week starts on Monday)
      %y           year, 0-68 for 2000-2068, 69-99 for 1969-1999
      %Y           year, 4-digit

Except for the non-numerical formats, these may be preceded by a "0" ("zero", not "oh") to pad the field length with leading zeroes, and a positive digit, to define the minimum field width (which will be overridden if the specified width is not large enough to contain the number). The %S format also accepts a precision specifier so that fractional seconds can be written. There is a 24-character limit to the length of the printed text; longer strings will be truncated.

Examples:

Suppose the text is "76/12/25 23:11:11". Then

      set format x                 # defaults to "12/25/76" \n "23:11"
      set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
      set format x "%r %D"         # "11:11:11 pm 12/25/76"

Suppose the text is "98/07/06 05:04:03.123456". Then

      set format x "%1y/%2m/%3d %01H:%02M:%06.3S"  # "98/ 7/  6 5:04:03.123"


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 4, 2012 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.