Ignition Min and Max Date From Dataset

Does anyone know an easy way to get the min and max date values from a dataset with multiple columns, one column is datetime? I’m using Ignition version 7.8.5.

Have you tried the minDate and maxDate expression functions?

Yeah, I get:
“NameError: name ‘minDate’ is not defined.”

Do I need to import anything before using it? Or is it not available on the version I’m using (7.8.5)?

These are expression functions, to be used in a binding. If you are scripting, iterate through the dataset to build a list from the timestamp column, then use python’s min and max functions. Something like this:

timestamps = [ds.getValueAt(r, 't_stamp') for r in range(ds.rowCount)]
print min(timestamps), max(timestamps)
1 Like

That worked, thank you!