1.40 FAQ-157 How do I add a date time stamp to my graph?

Last Update: 2/3/2015

To add the current date and time to the top of your graph window, click the Date & Time button Button Date Time.png on the Add Objects to Graph toolbar (View:Toolbars). To delete the stamp, click on the stamp to select it and press DELETE.

Adding a Date Time Stamp to Your Graph.png

Also, you can do further customization with the contents and/or formats of the date/time stamp:

To modifying the Date/Time Stamp:

  1. Double-click on the stamp to enter text edit mode.
  2. Edit or format the text label.

To change the default format of the Date/Time stamp, you must modify a line of LabTalk script. The Date & Time button runs a script in the [DateTime] section of the STANDARD.OGS file located in your Origin folder. That script consists of:

label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp $(@D,D10);

The $(@D,D10) portion of this line of script specifies date/time format. In the default case, Origin displays the 10th (D10) date format (numbered from zero) from the Origin date format list (this format represented as M/D/YYYY HH:MM:SS).

In order to view the Origin date format list:

  1. Double-click on any worksheet column to open the Column Properties dialog box.
  2. Select Date from the Format drop-down list. Origin's date formats display in the Display drop-down list (numbered from zero).

When you know the index number of the date format that you want:

  1. Open the file STANDARD.OGS in a text editor.
  2. Locate the [DateTime] section.
  3. Locate the line...
    label -s -sa -d (.6*page.width) (.05*page.height) -n timestamp $(@D,D10);
  4. Change D10 to Dn where n represents the nth item in Display drop-down list when Date is selected as Format.
  5. Save the modified OGS file.
  6. Click the Date & Time button to display your modified format.

Keywords:date, time, stamp, customize graph, add date and time, time stamp, add stamp