Robert,
Adiba Shaikh already gave the important hint by mentioning DeleteMissing
. An obvious approach using function interpolation could be this:
phx = CityData[{"Phoenix", "Arizona", "UnitedStates"}];
wdTemp = WeatherData[phx, "Temperature", {{2021, 6, 30}, {2021, 10, 2}}];
(* interpolating function: *)
wdTempFunc = DeleteMissing[wdTemp]["PathFunction"];
(* "... It is intended to return the temperature for the first 10 \
hours of 2021 July 1st ...": *)
datetime = DateRange[DateObject[{2021, 7, 1, 1, 0, 0}], DateObject[{2021, 7, 1, 10, 0, 0}], Quantity[1, "Hours"]];
(* result: *)
temperatures = {#, wdTempFunc[AbsoluteTime[#]]} & /@ datetime
But a quick glance at the data itself shows that this does not make sense here: In the time range in question the data are simply too coarse, too many data points appear to be missing - it does not agree with the expected daily pattern!
dlp = DateListPlot[{Normal[wdTemp][[;; 40]], temperatures},
GridLines -> {MinMax[datetime], None}, Joined -> False,
PlotStyle -> {{PointSize[.02], LightGray}, {PointSize[.01], Red}}]
