If you’ve had to use a repeat loop to try and more precisely filter health data, you know how much of a pain this process can be and it takes much longer than it should. If Apple gave the ability to use time in addition to the date for the find health samples action, it would be easy.
However, the reality is, we don’t have that as an option.
What I tried was to filter the data via JavaScript and the result was fantastic!
I’ve posted the shortcut template on RoutineHub for long term keeping. The link is below