I think I've got it, but I'm still not sure I fully understand, so
sorry if this is wrong.
1. The above formula does nothing for days "d". I'm guessing
you left that out to simplify the formula for posting here,
so I've ignored that part.
2. The first part (hours) works fine.
Left(t;Position(t;":";1;1)-1)
Entering 12:34:56 returns 12
3. The second part (minutes) has an issue, which is obviously
where your problem is.
Left(Middle(t;Position(t;":";1;1)+1;99);
Position(Middle(t;Position(t;":";1;1);99)&":"; ":";1;1)-1)
Entering 12:34:56 returns empty text.
4. Breaking that down into the separate parts.
a) The first section works fine
Middle(t;Position(t;":";1;1)+1;99)
Entering 12:34:56 returns 34:56
b) The next Middle function is missing the +1, like in a),
to skip over the first : after the hours. Adding in that +1
means it is
Left(Middle(t;Position(t;":";1;1)+1;99);
Position(Middle(t;Position(t;":";1;1)#+1#;99)&":"; ":";1;1)-1)
Entering 12:34:56 then return 34 instead of empty text.
[ Note: I've highlighted the extra +1 with two #, which need to be removed ]
[ before it will work in a FileMaker Pro calculation. ]
Without the extra +1 that part of the formula, when entering 12:34:56
is trying to get the minutes from ":34:56" sub-text using the first :
it finds, which of course results in the empty text.
Possibly that's not a full formula since it won't work with the other
example from you second post of
48 -> 48:00
it instead returns 0:48:00 because FileMaker can't know if "48" is
meant to be hours or minutes. (Or maybe that example wasn't correct
anyway.)
I think it's a complicated way to enter times. You would probably be
better to either train the data entry person to enter full times in the
format dd:hh:mm:ss (e.g. 48 hours would be 0:48:00:00) or by using
separate entry fields for Days, Hours, Minutes, and Seconds, and then
combining those.
Helpful Harry :o)