I would think that Alkaline would give the longest time, although they are one time use. On your Enerloop rechargeables, there is usually a rating in milli amp hours. It can range from 1500 to 2500 for AA batteries. Are they new batteries, and are you doing a fast charge? Fast chargers usually don't reach maximum level.
RE: phantom power
Condenser microphones require voltage to operate. It provides power to put a charge on the capsule, and operate any circuitry in the mic that boosts the signal. You will mostly see them classified as Large Diameter Condensers and Small Diameter Condensers. Examples would the mics like the Rode NT1, MXL990, Neumann U87, AKG P170. LDCs have a capsule of 1 inch or larger. SDCs are usually around 1/2 inch. Interfaces, and hand held recorders have an option to apply that voltage in the setup.
The other popular mics are dynamic mics, which operate essentially like a speaker in reverse. You have a coil of wire around a magnet attached to a diaphragm. Examples would be the Shure SM57, Sennheiser e835 or ElectroVoice RE20.
If you are only using the internal mics on the DR40 you don't need to worry about the setting, however you might want to turn off the phantom power just to avoid it being active.
Tascam lists the following as record times, but notice they don't mention using external mics w/phantom. Just using 4 channels cuts time by 40-50%. In any case, 30 minutes seems unusually short.