PI VISION Duration button time in calculation

Is it possible to use PI VISION Duration button time or Start time in calculation

example

tagtot('tag', * - Duration button time,'*') * 24

 

The purpose is to use the time range (start time to end time) of the pi vision to dynamically calculate the totaliser in selected ranges.