Arcade:
var start_date = Date(1483246800000); var end_date = Date(1514782799000); var seconds = DateDiff(end_date, start_date, "seconds"); var rnd_sec = Random() * seconds; var rnd_date = DateAdd(start_date, rnd_sec, "seconds"); return rnd_date
Arcade:
var start_date = $feature.IncidentDate; var diff = Round(Random() * (3600 - 28800) + 28800,0); var newdate = DateAdd(start_date, diff, "seconds"); return newdate;
var start_date ===== Sequential Numbers ===== <code> rec=0 def autoIncrement(): global rec pStart = 1 pInterval = 1 if (rec == 0): rec = pStart else: rec += pInterval return rec
autoIncrement()
import random def list_random(ran): return ran[random.randint(0,len(ran)-1)]
list_random(['kid', 'many', 'love', 'play'])
Arcade:
Round(Random() * (1000 - 10) + 10,0)
Python:
def randInt(rand): return rand[random.randint(20,3000)]
Expression: autoIncrement()
Code Block:
rec=0 def autoIncrement(): global rec pStart = 1 # adjust start value, if req'd pInterval = 1 # adjust interval value, if req'd if (rec == 0): rec = pStart else: rec = rec + pInterval return rec