Date and time in chart labels

All charts with history (time plot, time stack chart and time color chart) can display model dates in time (x-) axis labels. 

You can choose one of suggested formats or use some custom format which gives the best fit for your needs.

 To adjust the format of time axis labels

  1. Select the chart in the graphical editor or in the  Projects view. 
  2. Open the Appearance section of the chart's Properties.
  3. Using the Time axis format drop-down list choose one of suggested formats. If you want to use some custom format, choose here Custom and adjust the string defining labels format in the edit box to the right.
    If the Time axis format drop-down list is not visible, probably None is selected in the Horizontal axis lables drop-down list.
  4. If needed, you can display just number of model time units simulated so far in chart labels. In this case you should choose Model time units from the Time axis format drop-down list.

Predefined formats

Model date 

Model date (date only)

     

Model date (time only)

Custom formats

You can also specify your own format, explicitly specifying time units that should be shown in the time axis labels. 

Here we provide you with a pair of custom format examples:

HH:mm

Only hours and minutes are displayed. Use this format if you want to examine how your model behaves during the day:


yyyy

Only years are displayed. Use this format in the case you simulate a long period of time:

    

Custom date and time formats are specified by date and time pattern strings. Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. " ' ' " represents a single quote. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.

The following pattern letters are defined (all other characters from 'A' to 'Z' and from 'a' to 'z' are reserved):

Letter Date or Time Component Presentation Examples
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
Pattern letters are usually repeated, as their number determines the exact presentation. Hours must be between 0 and 23, and Minutes must be between 00 and 59. The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard.

Examples

The following examples show how date and time patterns are interpreted. The given date and time are 2001-07-04 12:08:56.
Date and Time Pattern Result
"yyyy.MM.dd 'at' HH:mm:ss" 2001.07.04 at 12:08:56
"EEE, MMM d, ''yy" Wed, Jul 4, '01
"h:mm a" 12:08 PM
"K:mm a" 0:08 PM
"yyyy.MMMMM.dd GGG hh:mm aaa" 2001.July.04 AD 12:08 PM
"EEE, d MMM yyyy HH:mm" Wed, 4 Jul 2001 12:08
"yyyy-MM-dd'T'HH:mm:ss" 2001-07-04T12:08:56