Generate a random date between 2 dates in Alteryx

Recently during a client project I was given data for when an applicant applied for a position and when they were hired. In order to have a placeholder for the time it takes to interview, I had to generate a random date between them that makes sense.

This can all be done with 1 formula tool.

1st: Calculate the difference between the application date and the hire date

 Test: DateTimeDiff([hire_date],[application_date],'days')

2nd: Generate a random number up to the previous difference.

 Rand Range: RandInt([Test])

3rd: Add that random number to the application date

 Interview_Date: DateTimeAdd([application_date],[Rand Range],'day')

Author:
Terrence Miller
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab