换算成秒,然后计算即可
Dim d1 As Date = "2016-03-20 08:00"Dim d2 As Date = "2016-03-20 08:30"Dim sp As TimeSpan = d2 - d1Dim tms As Double = sp.totalSecondsmsgbox(tms)Dim rad As Double = Rand.Next(tms)Dim d As Date = d1.AddSeconds(rad)msgbox(d)