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 archaeologists: 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.