Generate a random time

Does anyone know how I’d go about generating a random time in increments of 5~90 minutes from the current time?

I’m no programmer, but rand() gives you your random seed, which you then apply to your available time with a code to round to the nearest increment you need (which isn’t unambiguous from the question).

For tidiness, re-use, wrap that in a function.

1 Like

Got it, thanks.

var:number vMinute;
vMinute=round(rand()*10)*9;
$DateAffirmationdate(now).format("l")+" + "+ vMinute +" minute";
1 Like