When the crew of the Enterprise are talking to the food replicators on board about a beverage, they state the temperature in Celcius. Is there any record of when United Earth as a whole adopted the metric system?
So far as I can tell, nobody in Star Trek from the near future ever uses anything but the metric system.
We see people from future Earth in the following years:
- 2024, in the DS9 2-parter "Past Tense". To the best of my searching ability, none of them use any units at all.
- 2036, in the Voyager episode "One Small Step". There's some brief dialogue at the beginning of the episode between astronauts which involves metric units.
- 2050, at the very end of the Voyager episode "11:59". There's only one line, with no units in it.
- 2063, in Star Trek: First Contact. Lily talks about the cockpit of the Phoenix being four meters long. When Riker reports the Phoenix's speed (presumably reading off the instrumentation that Cochrane and Lily installed), it's in kilometers per second.
...and then we're into the backstory of the Enterprise crew, in "Broken Bow" and "First Flight." I can't find any humans using units (other than warp-scale numbers) in any of the flashback scenes in either of them. However, one Vulcan in "First Flight" does quote a length in kilometers; as they're not a Vulcan unit, this probably means the humans he's talking to use them.
So everyone who uses units, from the present up until the Enterprise era, uses the metric system.
That said, everyone who uses units, from the present up until the Enterprise era, is some kind of astronaut or scientist who might very well be using metric even if they were a present day American. So this is all kind of shaky. It's really too bad "Past Tense" doesn't have any units in it, as none of its past characters are scientists or astronauts.
Additionally, there seems to have been a revival of imperial/customary units in the 23rd century; for example, in "The Doomsday Machine," atmospheric pressure aboard the Constellation is reported as "eleven pounds per square inch." Though you could just chalk that up to Early Installment Weirdness...
Micah's answer reminded me of when I had recently watched the DS9 episode Past Tense: Part 1. There is a scene where Sisko and Bashir are filling out forms in Sanctuary District A, when Sisko realizes what day it is. As he's explaining the events that will occur a few days later, we get this shot of a screen on the wall:
As you can see, the temperature is listed in degrees Celsius. Since they are in a US government building, I think it's reasonable to assume that the US had switched to using Celsius at least by Friday, August 30th, 2024.
Since this predates the formation of the United Earth government, I think it's reasonable to assume they always used the metric system, at least for temperature.
For now, only two or three countries uses the Imperial system. In the future, probably no one is going to. As United Earth was the unification of Earth, It's probably that they chose the most used - the metric system over other systems. So I presume when It was created either all countries already used the metric system or It was chosen as the official one after it's creation.
I sincerely hope I could give you some information.
Bear in mind that the Imperial system is completely useless in engineering applications, and never used or taught in science or engineering courses at college or university. So in answer to your question, Earth already uses the metric system in serious applications. While the general public may still use imperial measurements on a united Earth, we only ever see starship crews and being trained in a variety of scientific and engineering disciplines, they'd all be used to metric anyway.
In the episode "Arena" S1/Ep18 Spock gives out the distance of enemy ground forces in yards measurements.