Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > Data Functions

GET DATA AT TIME(datavar,time) GET the value of a DATA variable at a specific TIME

Scroll Prev Top Next More

Returns the value of the data variable at the time specified, or :NA: if there is no data at that time of the variable passed as an argument is not a Data variable.  

If you pass :NA: as the argument the function will return the first Data value available and only return :NA: if there are no values or the variable passed as an argument is not a data variable.

Note that GET DATA AT TIME is slow compared to other functions on data.  For example GET DATA AT TIME(datavar,Time+1) is the same as defining an additional data variable

tshift datavar :RAW: := TIME SHIFT(datavar,1)

and then using that tshift datavar.  Defining the extra variable will give better performance.

Units: GET DATA AT TIME(units,time) --> units

Example

sales at time 20 = GET DATA AT TIME(sales data,20)

Availability: Not PLE or PLE Plus.

See also: TIME SHIFT, Data Equations, :NA:

Sample model: GET DATA AT TIME.mdl in FunctionExamples