1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Imports System
Namespace gfoidl.Tools
Public Class DateAndTime
Private _rnd As New Random()
Public Function GetRandomDate(ByVal minDate As DateTime, ByVal maxDate As DateTime) As DateTime
Dim days As Integer = (maxDate - minDate).Days
Dim randomDays As Integer = _rnd.[Next](0, days)
Return minDate.AddDays(randomDays)
End Function
End Class
End Namespace
|