Arguing that it is unnecessary for consumers to know when canned goods were packed because the contents remain edible for years, a lobbyist for the grocery industry told a legislative committee today that "you are eating peas right now that were packed in 1967, I'll make book on that."

Sen. Harry J. McGuirk (D-Baltimore) responded: "If consumers knew they were paying today's prices for 1966 peas, this room would be packed." McGuirk presided at the hearing before the Maryland Senate Economic Affairs Committee on a bill that would prohibit food packers from employing codes in marking dates on their products.

The sponsor of the bill, Sen. Arthur Dorman (D-Prince George's) said his proposal would not require food packers or grocers to put dates on their products, but if they did, they could not be in code.

Albert H. Evans, executive director of the Maryland Food Dealers Association, which represents the state's 3,000 grocery stores, said food dealers believe the bill is unnecessary and costly.

Sam Christine, a lobbyist for the state Chamber of Commerce, told the committee that Giant Foods had asked him to register its opposition to the bill.

Reached by telephone, Esther Peterson, Giant vice president for consumer affairs, said the food chain opposed the bill because it was "not clear" what it meant to accomplish.

"But we are absolutely in favor of open dating," said Mrs. Peterson, noting that Giant has conducted a large-scale advertising campaign in favor of open dating.

The bill says "any symbol used in dating consumer commodities may not be transposed, enchiphered, encoded or otherwise impossible or difficult to comprehend by persons without access to the cipher or code employed."

Mrs. Peterson said Dorman's language does not make it clear what the date means.She said she favors legislation such as a law that went into effect Jan. 1 in Ohio that makes it "relatively explicit" that the required date means that the product cannot be sold after the time shown.

"It's not as simple as just breaking the codes," she said. A law requires that the word "expires" appears with a date on eggs, for example, even though that does not mean the eggs cannot be eaten beyond then. As a result of the confusion, some people throw out perfectly good eggs and milk," she said.

Nevertheless, Mrs. Peterson indicated she was embarrassed that Giant's opposition to the bill was not explained to the committee. "I should come down and testify in behalf of open dating" Mrs. Peterson said.

Evans told Dorman that putting a date on canned goods would give a false impression to consumers. "You and I would like to live as long as the product is palatable," said Evans, adding that the food will be good so long as the vacuum seal remains unbroken.

"Then why code?" asked Sen. John C. Coolahan (D-Baltimore County).

Pointing to the code 6W317 stamped on the bottom of a can of mushrooms, Evans said the numbers and letters would, in the event of a botulism scare, for example, permit the packer to recall only the suspect batch or batches, without scaring the entire county or state. Evans added that some codes also allow the grocer to "trace the movement of a product" because key letters are punched on the cash register at the time of sale.

Evans also told the committee passage of the proposal would "create havoc" because of interstate complications. He acknowledged outside the hearing room that a half-dozen states, including New York, Massachusetts and California, already have similar laws. A similar bill passed the Maryland Senate last year but was defeated in the House.