Bill Hayes, an actor and singer whose 2,141 episodes of “Days of Our Lives” over five and a half decades constituted the daytime drama version of an ultramarathon, and whose top-selling 1955 single, “The Ballad of Davy Crockett,” remains seared into the memories of the baby boom generation, died on Jan. 12 at his home in Studio City, Calif. He was 98.

His wife and longtime co-star, Susan Seaforth Hayes, confirmed his death.

To soap opera fans, Mr. Hayes was a staple of weekday afternoons from the days of rabbit-ear antennas into the streaming era.

He began his tenure on the long-running NBC show in 1970. His character, Doug Williams, was a suave and slippery con artist who, after leaving prison, found himself padding through the maze of the plot twists, double-crosses and big reveals that day after day drew viewers back to the fictional Midwestern town of Salem.

While his character would eventually abandon his antisocial ways and become a pillar of the community, Mr. Hayes had fun in the early days playing a man with a past.

“You never knew if he was helping a lady across the street and being nice or unhooking her brassiere as they went across the street,” he was quoted as saying of his character in the book “Days of Our Lives: A Complete History of the Long-Running Soap Opera,” by Maureen Russell.