Short answer: Not long enough! There a few things to factor in when asking how long something can run on an inverter…
First – Can the inverter run it at all? For that, we need to know how many watts an item uses. While some appliances publish this information, most do not or only publish the amperage. To convert Amps to Watts it's Amps x Voltage = Watts. A typical RV AC unit uses about 13 Amps. So, 13 Amps x 120 Volts = 1560 Watts. Also, consider a minimum of 10% power loss converting DC to AC (what the inverter does). So, that's about 1700 Watts. Considering that's not the only thing running at any given time, a 2000W Inverter will be cutting it close but a 3000W Inverter will do it just fine. Note: many inverters can also provide surge ability above their rated capacity for short periods of time, which can help with the initial surge from an AC start. The batteries also need to be able to handle this.
Second – Can your batteries supply enough DC Amps for your Inverter? For this, we use the same formula in reverse. Assuming a 3000W inverter, it's 3000Watts / 12Volts = 250Amps. So, the battery bank needs to be able to supply 250Amps Continuous to max out the inverter. Use the same formula for the AC: 1700Watts / 12Volts = 142Amps. A higher voltage battery system can also be used which will lower the amperage for inverting. This will, however, require a DC to DC converter to lower the voltage to 12V for the rest of the RV.
Third – How long can I run it? Batteries are typically rated for both Amps (how many Amps it can supply continuously) and Amp Hours (Ah) (how long it can provide those amps). Let's use the battery bank from our last Inverter video, which is ten 100Ah batteries in parallel. Now, we're dealing with a battery bank capable of 1000Ah. If we take the 1000Ah divided by the 142Amps, we get 7.04. With no other loads, we could run one AC for about 7 hours. Assuming the AC unit will cycle on and off, we are able to run our AC all night without issue.
So, as you can see, without a HUGE and expensive battery bank, running ACs on Inverter isn't very practical. Adding a ton of solar to offset some of that improves things, but it's still all about the batteries.