LVT returns the last text value or value with a data qualifier found before a specified date/time.
SYNTAX:
LVT(VarNum, Offset, StartFlag, MaxDays, DecPlaces)
VarNum: The variable number to search
Offset: Sets which value to return. A setting of 1 will return the 1st value found, 2 will return the 2nd value and so forth. Searches backwards in time.
StartFlag: Sets when the seach begins. Has the following settings:
1 - Start searching on the start date
2 - Start searching on the end date
3 - Start searching one day before start date
4 - Start searching one day after the end date
11 - Start searching at the 11:59:59 PM of the Start Date.
12 - Start searching at the 11:59:59 PM of the End Date.
13 - Start searching at the 11:59:59 PM of one day before start date
14 - Start searching at the 11:59:59 PM of one day after the End Date.
“Date/Time” - A date/time in quotes to start the search on.
MaxDays: Sets maximum number of days to search before giving up. If the value of MaxDays is negative, this function will search ahead to find the next value in the future.
DecPlaces: Sets the number of decimal places.
EXAMPLES:
LVT(11,1,3,7,2) Find the 1st (Offset 1) value for variable 11 starting one day before the start date of the report and search backwards in time. Search up to 7 days.
LVT(11,2,1,31,1) Find the 2nd (Offset 2) value for variable 11 starting on the start date of the report and search back in time. Search up to 31 days.
LVT(2,1,4,-31,2) Find the 1st (Offset 1) value for variable 2 starting one day after the end date of the report and search forward in time up to 31 days.
LVT(2,1,”10/15/04 08:15”,10,2) Find the first value, start the search at 10/15/04 08:15. NOTE: if a daily detail value exists at exactly 10/15/04 08:15 it will find that value, i.e. it searches for date/times <= 10/15/04 08:15.