I have two DateTimes, dt1 < dt2. What is a reasonable way to randomly generate a DateTime that is in between dt1 and dt2? I started off by trying
dt3 = rand(dt1.instant.periods.value : dt2.instant.periods.value).
This gives me a randomly generated Int64 representation, but I do not know how to properly convert it back to a DateTime. Calling
DateTime(dt3) doesn’t seem to parse correctly, presumably because it needs dt3 to be of type Millisecond as opposed to Int64, but I do not know how to convert from Int64 back to Millisecond.