It should - UTCNow returns a standard DateTime, and Hour just returns an integer - so CDbl will just convert the
int32
to a
double
value.
And a quick check here:
Dim d As Double = CDbl(DateTime.UtcNow.Hour)
Says it works just fine...
d
contains 18.0, and it's 19:26 BST, which is GMT+1, or UTC+1 if you prefer...