Is there any way to randomize a timestamp without timezone with an interval of within 1hour? For example:
event_start = '2019-10-31 13:00:00'
event_end = '2019-10-31 14:00:00'
but can also be
event_start = '2019-10-31 13:00:00'
event_end = '2019-10-31 13:40:59'
you can add a random number of minutes to your timestamp:
timestamp '2019-10-31 13:00:00' + make_interval(mins => (random() * 59)::int)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.