Skip to main content
Version: 8.1

minDate

This function is used by Ignition's Expression language.

Description​

Finds and returns the minimum date in the given column of the given dataset, or the min value in a series of dates specified as arguments. When looking up the min date in a dataset, the column may be specified as an index or as a column name. Any null values in the column are ignored.

Syntax (index)​

minDate(dataset, columnIndex)

Parameters​

TypeParameterDescription
DatasetdatasetThe starting dataset to search.
IntegercolumnIndexThe index of the column to search for the min date. Must be a column index of the provided dataset.

Returns​

Date - The minimum date of the given date column in the given dataset.

Syntax (name)​

minDate(dataset, columnName)

Parameters​

TypeParameterDescription
DatasetdatasetThe starting dataset to search.
StringcolumnNameThe name of the column to search for the min date. Must match a column name in the provided dataset.

Returns​

Date - The minimum date of the given date column in the given dataset.

Syntax (date)​

minDate(date[, date])

Parameter​

TypeParameterDescription
DatedateA date. Can be as many dates as needed.

Returns​

Date - The minimum date of the given dates.

Examples​

Suppose you had a Table with this dataset in it.

AlarmTimePathSeverity
2010-01-08 7:28:04Tanks/Tank5/TempHiAlarm4
2010-01-08 10:13:22Tanks/Tank38/LoLevel2
2010-01-08 13:02:56Valves/Valve2/2
Code Snippet
minDate({Root Container.Table.data}, "AlarmTime") //You could use this expression to get the date and time for the oldest alarm