The Current Time variable returns a time value that can be used in expressions, labels, or masks.
The variable has the following characteristics:
- Uses the DataGraph Date/Time format
- Can be set for different Time zones
- Updates in real time
Current Time can be used to generate an automatic time-stamp for reports or use for animations.
Create the Variable
Create a Current Time variable using the Other menu, in the above the variables list.
Click the Other menu and select Current Time.
This will add the variable object where the value is the year, month, day, hour, minute in the DataGraph date/time format, such that each number is separated by a colon (i.e., YYYY:MM:DD:H:M).
Giving the variable a name removes the red error dot. You can also click the top left corner to reveal more options.
Expand to variable to view more options. You can specify the time increment that is returned.
When you make the increment larger, such as the day, the actual value of the variable is the beginning of the day.
DataGraph uses the UTC time representation which is the number of seconds since 1970. Thus the value here would be the number of seconds when the clock turns to this day at midnight. More details about the date/time format can be found here.
By default, the time zone is set to the current time zone. There are four additional time zone codes for the U.S. that are available in the drop-down menu. See the NIST https://www.time.gov web site for more detail on these codes.
Select Specified to use other standard abbreviations for time zones.
Or you can enter the UTC offset as a numeric value.