How to ... store a date stamp as a variable? (OpenLAB CDS Intelligent Reporting)

Document created by agilent Employee on Mar 24, 2016
Version 1Show Document
  • View in full screen mode

The calculation variables of IR can store numbers, but no strings or dates.

In case you want to report e.g. the latest result modification of a sequence you may want to report only a single time stamp.


Here's a possible solution:

  • Add a result table to your template
  • Sort your result table by Injection_LastModifiedDate (ascending)
  • The function first(Injection_LastModifiedDate) will return the time stamp of interest. For validation purposes you should show this value in a column
  • To report this number outside of a table you could store the difference of the latest modification time stamp and any other globally availabl time stamp (e.g. the sequence acquisition date). This number will be added to your reference time stamp again in the output field.


Use the following syntax to store the time difference in seconds:



  • Save this expression result in a variable
  • Hide the table or the columns you do not like to show
  • The following syntax is used to add the difference again in the output field. Mind the formatting to your local time zone! :



The attached template could be used to create a custom composite group for re-use with your templates.

(Template generated with OpenLAB CDS A.01.04)


(originally posted in OpenLAB Forum:

2014 November 13 by Bernhard Etrich)