PostgreSQL: change date by the random number of days
select date(now() + trunc(random() * 20) * '1 day'::interval);
Any existing date column can also be used in place of now()
See: https://www.postgresql.org/docs/current/functions-datetime.html
How random? For example - if you want random data from last year:
select cast( now() - '1 year'::interval * random() as date );