How can I create a DateTime column with random values within the specified range?
To do this, first open the ‘Add new column’ dialog from Edit | Add new Column…
Then, it’s easy to use a combination of Date
and Rnd
functions to come up with a random date. For instance, enter the following into the ‘Formula’ field in order to get random
dates within 1990-1995:
Date(Rnd(5) + 1990, Rnd(12), Rnd(31))
Also see video tutorial about calculated columns on out YouTube channel and look at the Add New Column and Functions wiki pages.
We have also added a bunch of other commonly used date functions, check it out by going to Functions, and checking “date” (sorry for the mess with too many categories there, we will clean it up soon). Or, actually, here is the direct link: https://public.datagrok.ai/functions?q=%23date