CHICAGO, Oct 20 (Reuters) - U.S. corn futures hit a two-week high on Wednesday and soybean and wheat futures also advanced, supported by brisk global demand, firm cash markets and slow-moving harvests in some production zones.

Record highs for palm oil futures lent support to oilseed futures, including soybeans and soyoil.

As of 12:57 p.m. CDT (1757 GMT), Chicago Board of Trade December corn was up 8-1/2 cents at $5.38-3/4 a bushel after reaching $5.39-1/2, its highest since Oct. 6.

CBOT November soybeans were up 20-1/2 cents at $12.48-1/2 a bushel and December wheat was up 13 cents at $7.49 a bushel.

With the U.S. harvest of corn and soybeans more than halfway complete, some end-users are raising their basis bids as they work to draw out supplies from farmers. Grain offerings have been limited by rains slowing fieldwork in the eastern Midwest, and worries among growers about rising costs for crop inputs such as fertilizer.

"With inputs going up, the producer is uncertain what his costs are going to be. So he is selling the excess (grain) that he can't store, but holding on to the rest because of inflationary fears," said Don Roose, president of Iowa-based U.S. Commodities.

Meanwhile, the U.S. Energy Information Administration said weekly production of corn-based ethanol in the latest week rose to 1.096 million barrels per day, the biggest weekly total since June 2019, while stockpiles rose to 20.080 million barrels.

Tightening global supplies of vegetable oil lent support to the soy complex. Malaysian palm oil futures rose more than 2% to a record closing high.

CBOT December soyoil futures were on track for a sixth straight higher close, rising 2.30 cents at 64.69 cents per pound after reaching 64.80 cents, the contract's highest since July 30.

Minneapolis Grain Exchange spring wheat futures led U.S. wheat markets higher, reflecting tightening global supplies of top-quality milling wheat. Front-month MGEX wheat reached $9.94 a bushel, the highest on a continuous chart of the spot contract since July 2012.

Constant rains in China in recent weeks have slowed wheat planting and autumn harvesting, a government official said on Wednesday.

(Reporting by Julie Ingwersen; additional reporting by Gus Trompiz in Paris and Naveen Thukral in Singapore; Editing by Subhranshu Sahu, David Evans and Alison Williams)