In a statement, the Danish royal household said Queen Margrethe II, 82, cancelled her official duties after the Tuesday night test.
The palace said her oldest son, heir to the throne Crown Prince Frederik, and his wife, Crown Princess Mary, would take the Queen’s place hosting a dinner with Danish government officials and members of Parliament.
Queen Margrethe II previously tested positive for the virus in February. At the time, the palace said she had received three doses of a Covid-19 vaccine.
The Danish monarch was among the dignitaries who attended Queen Elizabeth II’s funeral on Monday at Westminster Abbey in London.
Earlier this year, Margarethe told ITV News that the British queen had made an "enormous" impression on her.
"The fact that she was dedicating her life. I understood what that meant. This is for life," Margarethe said.
Want a quick and expert briefing on the biggest news stories? Listen to our podcast to find out What You Need To Know
Margrethe’s half-century reign makes her Europe’s longest-serving monarch following the September 8 death of Elizabeth, 96, who ruled for 70 years.
Out of respect for the late British monarch, Margrethe had asked her court to adjust the September 10-11 programme for her own 50-year anniversary commemorations.
Among the events she cancelled at short notice was appearing on the Amalienborg Palace balcony to greet well-wishers and a ride in a horse-drawn carriage through Copenhagen.
Margrethe was proclaimed queen on January 15, 1972, a day after her father, King Frederik IX, died following a short illness.