No definite figure can be given, as so much depends on circumstances.
- were prefabricated parts available for use? This saves a lot of time
- availability of appropriate raw materials. A nearby forest with nice straight trees helps a lot
- trained craftsmen. If you have a few hundred carpenters and blacksmiths experienced in building the equipment you need, they can churn them out faster than if you have to have it all done by conscript soldiers who're learning on the job
- number of devices in the production run. The first one is going to take longer than the xth, as your people get "in the groove" and set up assembly lines
- tools. If you don't have the right tools with you, it's going to take a lot longer
Given enough people, premade parts, and proper tools, a trebuchet or similar device (and this has been done by historians and archeologists, it was aired on History and I guess elsewhere a few years ago but I'm sure there are more sources) can be put together in a few hours by a relatively small team.