Re: HElP: i need to calculate time spent on the system with the following start time and end time.
If you take a look at the interval-function, then you'll see it is scripted 'D hh:mm:ss', where between D and hh, there is a space. This space you'll find back in your interval variable as well. (e.g. '2 00:12:12')
In order to separate the days (D) and the hours/minutes/seconds (hh:mm:ss), we will now use this space.
In the subfield-statement, you look for a unique separator, in this case the space, and you use that to 'cut' your variable.
Subfield (interval, ' ', 1) as Y actually reads like : take the variable interval, look for the separator 'space' (' '), and then return the first bit of information before the separator. So, between the brackets, you put a space (1 hit on your spacebar)
To make it more visible, you could script the interval function as 'D|hh:mm:ss'. The separator is then no longer a space, but a |. Your variable becomes e.g. 2|00:12:12. The subfield command then becomes Subfield(interval, '|',1).