Date/Time Formatting

In addition to numbers and text, dates and times are format types in Grapher. Dates and times can be used to create a graph, as axis and plot labels, to clip the graph, and to set axis limits.

Using Date/Time Formatting

To use dates and times in Grapher, the data need to be formatted as dates and times. One way to format data in Grapher is to use the worksheet. The worksheet can be accessed with the File | New | Worksheet, File | Open, Graph Tools | Worksheet | Display commands, and through the Worksheet Manager. Highlight the column containing dates and times and then select Data Tools | Format | Format Cells to set the column as date/time in the worksheet.

Once the formatting is set to date/time, you can use the date/time information just as you would use numbers in Grapher:

  • you can plot the data using date/time without converting the dates and times into serial numbers

  • you can set the axis limits using dates and times

  • you can set plot clipping using dates and times

Date/time information can also be used as plot labels and tick labels.

Date/Time Formatting Tips

  • In the worksheet, save data files containing date/time formatting as Excel files to preserve the date time formatting as seen in the worksheet.

  • You can save date/time-formatted data files as ASCII files (.DAT, .CSV, .TXT, .BNA, or BLN). Sometimes this is necessary if you exceed the Excel row or column limits. When opening the file in Grapher's worksheet, you can make the serial numbers appear as dates by using Data Tools | Format | Format Cells.

  • If you have formatted the data as date/time in another spreadsheet program such as Excel, the data are formatted as date/time in Grapher.

  • Whenever possible, enter and display dates and times in one of the many calendar formats, e.g., "6/14/2009” or “14-June-2009”, and let the software handle converting to/from internal numeric representations.

  • When the recognized format is ambiguous (i.e. 10/7/12), the month, day, and year order is determined by the Windows locale. In some countries, this will be recognized as M/d/yy, in others as d/M/yy, and in others as YY/M/d. It is important to use non-ambiguous date/time formats when the Windows locale may change.

  • If dates/times occur before 1/1/0000, use the BC or BCE suffix after the date. So, Alexander III of Macedon's birthday would be listed as 20-July-356 BCE in the worksheet. Using AD or CE is not necessary and the worksheet will automatically remove these in dates after 1/1/0000.

  • The year 0 is defined, according to the ISO 8601:2004 standard.

  • When a two-digit year is input in the worksheet (00 to 99), it means the year in the current century. For instance, inputting 11/4/13, indicates that the year is 2013, not 0013. In order to have the year 0013, the full four digits (0013) must be input for the date. So, the date would be input as 11/4/0013 CE for November 4, 0013 CE or 11/4/0013 BCE for November 4, 0013 BCE.

  • If the data is not displaying like you have specified in the Label Format dialog, check the Use Data/Time Format box in the Major Label Text section of the axes properties Tick Labels page.

  • When inputting date/time values in the Property Manager, date/times must always be entered as MM/dd/yyyy hh:mm:ss. No other formats are permitted in the date/time edit boxes in the Property Manager.

See Also

Plot Labels

Tick Labels.