Unless you want to be shared for a stop-over, you must limit yourself to 23:59 minutes. Most travel sites let you search for flights and sort by total duration. This will help you find the longest stop-over at the end of the list.
What often happens with popular routes is that you will not be offered such a layover because there are enough shorter options. What I've done in that case is do the same search but sort by departure time first and then arrival time. Take a note of segment which arrives the earliest at your layover and then the look for the segment which departs the latest. Then call, the airline and ask for a route with those two segment. I've done this several times but not with Hong Kong particularly.
For a longer stay you want a stopover and that usually has to be done with the airline anyway. You can try multi-city routes directly online but I've never seen it return a reasonable price for the ones I tried.