Current Date Tags
The
You can use a fixed date or take a date from a file. A format tag is also accepted.
For example:
- default-current-date "2021/04/19"
- default-current-date from-file="current-date.txt"
The from-file example expects the text file to be in the factory project's config directory. If you are setting the date from a text file, ensure that the process for creating that text file is in place.
TIP: You can retrieve this date in a Spectre expression using the current_date() function as shown in the following example:
filter `value("Date") != null and value("Date") <= current_date()`
Current Date Tags
| Tags | Examples | Notes |
|---|---|---|
| default-current-date | default-current-date "2019/05/11" |
Declares a fixed date as the build date for the factory. This date indicates the data is complete as of this date. Sets the date for the factory build such that it matches the date in DivePort used as the current date for time series and QuickViews. |
| from-file |
|
Obtains the date from a text file located in the factory project's config directory. |
| format |
|
Sets the date format. |
| maximum |
maximum "2020/01/01" } |
Defines a maximum value for the current date. |
| minimum |
minimum "2000/01/01" maximum from-file="date-range-end.txt" } |
Defines a minimum value for the current date. |
| take-parameter |
take-parameter "Factory Date" default-current-date "$(Factory Date)" |
Declares a build-time parameter used in the factory. Allows you to set the current date using the parameter's value. |