Is a little confusing what you are trying to achieve for me, but I can tell you that you cant’t change the duration of any composition by expression, for that you need to use a script.
[Adam Greenberg] “The time remap expression will alter the speed from 10;00;00;25 to 10:00:03:11 ) and that is exactly what I want.
The other part of the math I am having a hell of a time with; is that this slider will have a decimal point. So let us say that the user enters 7.17 as the input value into the slider.
I want this to represent 7 seconds and 17 frames which logically would give me a time code of 10;00;07;16 ) because the comp starts at 10;00;00;00;00”
A simplest way to achieve that is to converting the input value to string and then split the string:
sliderVal = thisComp.layer("sliderLayer").effect("Slider Control")("Slider").value;
stringVal = sliderVal.toString();
timeFrames = stringVal.split(".");
At that point you only need to map the frame value (timeFrames[1]) to your framerate.